Documentation
¶
Overview ¶
Package github implements a simple client to consume gitlab API.
Index ¶
- Constants
- type AcceptMergeRequestRequest
- type ActivityFeed
- type AddMergeRequestRequest
- type ArtifactsFile
- type Branch
- type BranchCommit
- type Build
- type ChangeItem
- type Commit
- type CommitStatus
- type FeedCommit
- type Gitlab
- func (g *Gitlab) Activity() (ActivityFeed, error)
- func (g *Gitlab) AddGroup(group *Group) (*Group, error)
- func (g *Gitlab) AddIssue(projectId string, req *IssueRequest) (issue *Issue, err error)
- func (g *Gitlab) AddKey(title, key string) error
- func (g *Gitlab) AddMergeRequest(req *AddMergeRequestRequest) (*MergeRequest, error)
- func (g *Gitlab) AddProject(project *Project) (*Project, error)
- func (g *Gitlab) AddProjectDeployKey(id, title, key string) error
- func (g *Gitlab) AddProjectHook(id, hook_url string, push_events, issues_events, merge_requests_events bool) error
- func (g *Gitlab) AddUserKey(id, title, key string) error
- func (g *Gitlab) AllProjects() ([]*Project, error)
- func (g *Gitlab) AllRunners(page, per_page int) ([]*Runner, error)
- func (g *Gitlab) CurrentUser() (User, error)
- func (g *Gitlab) DeleteKey(id string) error
- func (g *Gitlab) DeleteRunner(id int) (*Runner, error)
- func (g *Gitlab) DeleteUser(id string) error
- func (g *Gitlab) DisableProjectRunner(project_id string, id int) (*Runner, error)
- func (g *Gitlab) EditMergeRequest(mr *MergeRequest) error
- func (g *Gitlab) EditProjectHook(id, hook_id, hook_url string, ...) error
- func (g *Gitlab) EnableProjectRunner(project_id string, id int) (*Runner, error)
- func (g *Gitlab) Group(id string) (*Group, error)
- func (g *Gitlab) GroupMembers(id string) ([]*Member, error)
- func (g *Gitlab) GroupProjects(id string) ([]*Project, error)
- func (g *Gitlab) Groups() ([]*Group, error)
- func (g *Gitlab) ListKeys(id string) ([]*PublicKey, error)
- func (g *Gitlab) Namespaces() ([]*nNamespace, error)
- func (g *Gitlab) Project(id string) (*Project, error)
- func (g *Gitlab) ProjectBranches(id string) ([]*Branch, error)
- func (g *Gitlab) ProjectBuild(id, buildId string) (*Build, error)
- func (g *Gitlab) ProjectBuildArtifacts(id, buildId string) (io.ReadCloser, error)
- func (g *Gitlab) ProjectBuilds(id string) ([]*Build, error)
- func (g *Gitlab) ProjectCancelBuild(id, buildId string) (*Build, error)
- func (g *Gitlab) ProjectCommitBuilds(id, sha1 string) ([]*Build, error)
- func (g *Gitlab) ProjectCommitStatuses(id, sha1 string) ([]*CommitStatus, error)
- func (g *Gitlab) ProjectDeployKey(id, key_id string) (*PublicKey, error)
- func (g *Gitlab) ProjectDeployKeys(id string) ([]*PublicKey, error)
- func (g *Gitlab) ProjectEraseBuild(id, buildId string) (*Build, error)
- func (g *Gitlab) ProjectHook(id, hook_id string) (*Hook, error)
- func (g *Gitlab) ProjectHooks(id string) ([]*Hook, error)
- func (g *Gitlab) ProjectMembers(id string) ([]*Member, error)
- func (g *Gitlab) ProjectMergeRequest(id, merge_request_id string) (*MergeRequest, error)
- func (g *Gitlab) ProjectMergeRequestAccept(id, merge_request_id string, req *AcceptMergeRequestRequest) (*MergeRequest, error)
- func (g *Gitlab) ProjectMergeRequestCancelMerge(id, merge_request_id string) (*MergeRequest, error)
- func (g *Gitlab) ProjectMergeRequestChanges(id, merge_request_id string) (*MergeRequestChanges, error)
- func (g *Gitlab) ProjectMergeRequestCommits(id, merge_request_id string) ([]*Commit, error)
- func (g *Gitlab) ProjectMergeRequests(id string, params map[string]string) ([]*MergeRequest, error)
- func (g *Gitlab) ProjectRetryBuild(id, buildId string) (*Build, error)
- func (g *Gitlab) ProjectRunners(project_id string, page, per_page int) ([]*Runner, error)
- func (g *Gitlab) Projects() ([]*Project, error)
- func (g *Gitlab) RemoveGroup(id string) (bool, error)
- func (g *Gitlab) RemoveProject(id string) (bool, error)
- func (g *Gitlab) RemoveProjectDeployKey(id, key_id string) error
- func (g *Gitlab) RemoveProjectHook(id, hook_id string) error
- func (g *Gitlab) RepoActivityFeed(feedPath string) ActivityFeed
- func (g *Gitlab) RepoBranch(id, refName string) (*Branch, error)
- func (g *Gitlab) RepoBranches(id string) ([]*Branch, error)
- func (g *Gitlab) RepoCommits(id string) ([]*Commit, error)
- func (g *Gitlab) RepoRawFile(id, sha, filepath string) ([]byte, error)
- func (g *Gitlab) RepoTags(id string) ([]*Tag, error)
- func (g *Gitlab) RepoTree(id, path, ref_name string) ([]*TreeNode, error)
- func (g *Gitlab) ResourceUrl(url string, params map[string]string) string
- func (g *Gitlab) ResourceUrlRaw(u string, params map[string]string) (string, string)
- func (g *Gitlab) Runner(id int) (*Runner, error)
- func (g *Gitlab) Runners(page, per_page int) ([]*Runner, error)
- func (g *Gitlab) SearchNamespaces(query string) ([]*nNamespace, error)
- func (g *Gitlab) UpdateGroup(id string, group *Group) (*Group, error)
- func (g *Gitlab) UpdateProject(id string, project *Project) (*Project, error)
- func (g *Gitlab) UpdateRunner(id int, runner *Runner) (*Runner, error)
- func (g *Gitlab) User(id string) (*User, error)
- func (g *Gitlab) UserKey(id string) (*PublicKey, error)
- func (g *Gitlab) UserKeys() ([]*PublicKey, error)
- func (g *Gitlab) Users(page, per_page int) ([]*User, error)
- type Group
- type Hook
- type HookObjAttr
- type HookPayload
- type Issue
- type IssueRequest
- type Link
- type Member
- type MergeRequest
- type MergeRequestChanges
- type Milestone
- type Namespace
- type Person
- type Project
- type PublicKey
- type Runner
- type Tag
- type TreeNode
- type User
- type Visibility
Constants ¶
const ( // VisibilityPrivate indicates project access must be granted explicitly for each user. VisibilityPrivate = Visibility("private") // VisibilityInternal indicates the project can be cloned by any logged in user. VisibilityInternal = Visibility("internal") // VisibilityPublic indicates the project can be cloned without any authentication. VisibilityPublic = Visibility("public") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityFeed ¶
type AddMergeRequestRequest ¶
type AddMergeRequestRequest struct { SourceBranch string `json:"source_branch"` TargetBranch string `json:"target_branch"` AssigneeId int `json:"assignee_id,omitempty"` Title string `json:"title"` Description string `json:"description,omitempty"` TargetProjectId int `json:"target_project_id,omitempty"` Lables []string `json:"lables,omitempty"` }
type ArtifactsFile ¶
type Branch ¶
type Branch struct { Name string `json:"name,omitempty"` Protected bool `json:"protected,omitempty"` Commit *BranchCommit `json:"commit,omitempty"` }
type BranchCommit ¶
type BranchCommit struct { Id string `json:"id,omitempty"` Tree string `json:"tree,omitempty"` AuthoredDateRaw string `json:"authored_date,omitempty"` CommittedDateRaw string `json:"committed_date,omitempty"` Message string `json:"message,omitempty"` Author *Person `json:"author,omitempty"` Committer *Person `json:"committer,omitempty"` }
type Build ¶
type Build struct { Id int `json:"id"` ArtifactsFile ArtifactsFile `json:"artifacts_file"` Commit Commit `json:"commit,omitempty"` CreatedAt string `json:"created_at"` DownloadURL string `json:"download_url"` FinishedAt string `json:"finished_at"` Name string `json:"name"` Ref string `json:"ref"` Stage string `json:"stage"` StartedAt string `json:"started_at"` Status string `json:"status"` Tag bool `json:"tag"` User User `json:"user"` When string `json:"when,omitempty"` Manual bool `json:"manual,omitempty"` }
type ChangeItem ¶
type ChangeItem struct { OldPath string `json:"old_path,omitempty"` NewPath string `json:"new_path,omitempty"` AMode string `json:"a_mode,omitempty"` BMode string `json:"b_mode,omitempty"` Diff string `json:"diff,omitempty"` NewFile bool `json:"new_file,omitempty"` RenamedFile bool `json:"renamed_file,omitempty"` DeletedFile bool `json:"deleted_file,omitempty"` }
type CommitStatus ¶
type CommitStatus struct { Status string `json:"status"` CreatedAt time.Time `json:"created_at"` StartedAt *time.Time `json:"started_at"` Name string `json:"name"` AllowFailure bool `json:"allow_failure"` Author User `json:"author"` Description *string `json:"description"` Sha string `json:"sha"` TargetURL string `json:"target_url"` FinishedAt *time.Time `json:"finished_at"` ID int `json:"id"` Ref string `json:"ref"` }
type FeedCommit ¶
type Gitlab ¶
type Gitlab struct { BaseUrl string ApiPath string RepoFeedPath string Token string Client *http.Client }
func (*Gitlab) Activity ¶
func (g *Gitlab) Activity() (ActivityFeed, error)
func (*Gitlab) AddGroup ¶
Creates a new project group. Available only for users who can create groups.
Required fields on group:
- Name
- Path
Optional fields on group:
- Description
- Visibility
- LfsEnabled
- RequestAccessEnabled
- ParentId
Other fields on group are not supported by the GitLab API
func (*Gitlab) AddIssue ¶
func (g *Gitlab) AddIssue(projectId string, req *IssueRequest) (issue *Issue, err error)
func (*Gitlab) AddMergeRequest ¶
func (g *Gitlab) AddMergeRequest(req *AddMergeRequestRequest) (*MergeRequest, error)
Creates a new merge request.
POST /projects/:id/merge_requests
Parameters:
id The ID of a project
func (*Gitlab) AddProject ¶
Creates a new project owned by the authenticated user.
One (or more) of the following fields are required:
- Name
- Path
func (*Gitlab) AddProjectDeployKey ¶
Add deploy key to project.
POST /projects/:id/keys
Parameters:
id The ID of a project title The key title key The key value
func (*Gitlab) AddProjectHook ¶
func (g *Gitlab) AddProjectHook(id, hook_url string, push_events, issues_events, merge_requests_events bool) error
Add new project hook.
POST /projects/:id/hooks
Parameters:
id The ID or NAMESPACE/PROJECT_NAME of a project hook_url The hook URL push_events Trigger hook on push events issues_events Trigger hook on issues events merge_requests_events Trigger hook on merge_requests events
func (*Gitlab) AddUserKey ¶
func (*Gitlab) AllProjects ¶
Get a list of all GitLab projects (admin only).
func (*Gitlab) AllRunners ¶
Get all runners.
GET /runners/all
Parameters:
page The start page per_page Number of runners per page
Usage:
runners, err := gitlab.AllRunners(0,20) if err != nil { fmt.Println(err.Error()) } fmt.Printf("%+v\n", runner)
func (*Gitlab) CurrentUser ¶
func (*Gitlab) DeleteRunner ¶
Delete a runner.
DELETE /runners/:id
Parameters:
id The id of a runner.
Usage:
runner, err := gitlab.DeleteRunner(6) if err != nil { fmt.Println(err.Error()) }
func (*Gitlab) DeleteUser ¶
func (*Gitlab) DisableProjectRunner ¶
Disable a specific Project Runner
func (*Gitlab) EditMergeRequest ¶
func (g *Gitlab) EditMergeRequest(mr *MergeRequest) error
Updates an existing merge request.
PUT /projects/:id/merge_request/:merge_request_id
Parameters:
id The ID of a project
func (*Gitlab) EditProjectHook ¶
func (g *Gitlab) EditProjectHook(id, hook_id, hook_url string, push_events, issues_events, merge_requests_events bool) error
Edit existing project hook.
PUT /projects/:id/hooks/:hook_id
Parameters:
id The ID or NAMESPACE/PROJECT_NAME of a project hook_id The ID of a project hook hook_url The hook URL push_events Trigger hook on push events issues_events Trigger hook on issues events merge_requests_events Trigger hook on merge_requests events
func (*Gitlab) EnableProjectRunner ¶
Enable a specific Project Runner
func (*Gitlab) GroupMembers ¶
Gets a list of group or project members viewable by the authenticated user
func (*Gitlab) GroupProjects ¶
Get a list of projects in this group.
func (*Gitlab) Groups ¶
Get a list of groups. (As user: my groups or all available, as admin: all groups)
func (*Gitlab) Namespaces ¶
func (*Gitlab) Project ¶
Get a specific project, identified by project ID or NAME, which is owned by the authentication user. Namespaced project may be retrieved by specifying the namespace and its project name like this:
`namespace%2Fproject-name`
func (*Gitlab) ProjectBranches ¶
Lists all branches of a project.
func (*Gitlab) ProjectBuildArtifacts ¶
func (g *Gitlab) ProjectBuildArtifacts(id, buildId string) (io.ReadCloser, error)
func (*Gitlab) ProjectCancelBuild ¶
func (*Gitlab) ProjectCommitBuilds ¶
func (*Gitlab) ProjectCommitStatuses ¶
func (g *Gitlab) ProjectCommitStatuses(id, sha1 string) ([]*CommitStatus, error)
func (*Gitlab) ProjectDeployKey ¶
Get single project deploy key.
GET /projects/:id/keys/:key_id
Parameters:
id The ID of a project key_id The ID of a key
func (*Gitlab) ProjectDeployKeys ¶
Get list of project deploy keys.
GET /projects/:id/keys
Parameters:
id The ID of a project
func (*Gitlab) ProjectEraseBuild ¶
func (*Gitlab) ProjectHook ¶
Get single project hook.
GET /projects/:id/hooks/:hook_id
Parameters:
id The ID of a project hook_id The ID of a hook
func (*Gitlab) ProjectHooks ¶
Get list of project hooks.
GET /projects/:id/hooks
Parameters:
id The ID of a project
func (*Gitlab) ProjectMergeRequest ¶
func (g *Gitlab) ProjectMergeRequest(id, merge_request_id string) (*MergeRequest, error)
Get single project merge request.
GET /projects/:id/merge_requests/:merge_request_id
Parameters:
id The ID of a project merge_request_id The ID of a merge request
func (*Gitlab) ProjectMergeRequestAccept ¶
func (g *Gitlab) ProjectMergeRequestAccept(id, merge_request_id string, req *AcceptMergeRequestRequest) (*MergeRequest, error)
Merge changes submitted with MR.
PUT /projects/:id/merge_request/:merge_request_id/merge
Parameters:
id The ID of a project merge_request_id The ID of a merge request
func (*Gitlab) ProjectMergeRequestCancelMerge ¶
func (g *Gitlab) ProjectMergeRequestCancelMerge(id, merge_request_id string) (*MergeRequest, error)
Cancel Merge When Build Succeeds.
PUT /projects/:id/merge_request/:merge_request_id/cancel_merge_when_build_succeeds
Parameters:
id The ID of a project merge_request_id The ID of a merge request
func (*Gitlab) ProjectMergeRequestChanges ¶
func (g *Gitlab) ProjectMergeRequestChanges(id, merge_request_id string) (*MergeRequestChanges, error)
Get information about the merge request including its files and changes.
GET /projects/:id/merge_request/:merge_request_id/changes
Parameters:
id The ID of a project merge_request_id The ID of a merge request
func (*Gitlab) ProjectMergeRequestCommits ¶
Get a list of merge request commits.
GET /projects/:id/merge_request/:merge_request_id/commits
Parameters:
id The ID of a project merge_request_id The ID of a merge request
func (*Gitlab) ProjectMergeRequests ¶
Get list of project merge requests.
GET /projects/:id/merge_requests
Parameters:
id The ID of a project
Params:
iid (optional) - Return the request having the given iid state (optional) - Return all requests or just those that are merged, opened or closed order_by (optional) - Return requests ordered by created_at or updated_at fields. Default is created_at sort (optional) - Return requests sorted in asc or desc order. Default is desc
func (*Gitlab) ProjectRetryBuild ¶
func (*Gitlab) ProjectRunners ¶
Get all projects runners.
GET /projects/:id/runners
Parameters:
page The start page per_page Number of runners per page
Usage:
runners, err := gitlab.AllRunners(0,20) if err != nil { fmt.Println(err.Error()) } fmt.Printf("%+v\n", runner)
func (*Gitlab) RemoveProject ¶
Remove a project.
func (*Gitlab) RemoveProjectDeployKey ¶
Remove deploy key from project
DELETE /projects/:id/keys/:key_id
Parameters:
id The ID of a project key_id The ID of a key
func (*Gitlab) RemoveProjectHook ¶
Remove hook from project.
DELETE /projects/:id/hooks/:hook_id
Parameters:
id The ID or NAMESPACE/PROJECT_NAME of a project hook_id The ID of hook to delete
func (*Gitlab) RepoActivityFeed ¶
func (g *Gitlab) RepoActivityFeed(feedPath string) ActivityFeed
func (*Gitlab) RepoBranch ¶
Get a single project repository branch.
GET /projects/:id/repository/branches/:branch
Parameters:
id The ID of a project branch The name of the branch
func (*Gitlab) RepoBranches ¶
Get a list of repository branches from a project, sorted by name alphabetically.
GET /projects/:id/repository/branches
Parameters:
id The ID of a project
Usage:
branches, err := gitlab.RepoBranches("your_projet_id") if err != nil { fmt.Println(err.Error()) } for _, branch := range branches { fmt.Printf("%+v\n", branch) }
func (*Gitlab) RepoCommits ¶
Get a list of repository commits in a project.
GET /projects/:id/repository/commits
Parameters:
id The ID of a project refName The name of a repository branch or tag or if not given the default branch
Usage:
commits, err := gitlab.RepoCommits("your_projet_id") if err != nil { fmt.Println(err.Error()) } for _, commit := range commits { fmt.Printf("%+v\n", commit) }
func (*Gitlab) RepoRawFile ¶
Get Raw file content
func (*Gitlab) RepoTags ¶
Get a list of repository tags from a project, sorted by name in reverse alphabetical order.
GET /projects/:id/repository/tags
Parameters:
id The ID of a project
Usage:
tags, err := gitlab.RepoTags("your_projet_id") if err != nil { fmt.Println(err.Error()) } for _, tag := range tags { fmt.Printf("%+v\n", tag) }
func (*Gitlab) RepoTree ¶
Get a list of repository files and directories in a project.
GET /projects/:id/repository/tree
Parameters:
id (required) The ID of a project path (optional) The path inside repository. Used to get contend of subdirectories ref_name (optional) The name of a repository branch or tag or if not given the default branch
Usage:
pass nil when not using optional parameters
func (*Gitlab) ResourceUrl ¶
func (*Gitlab) ResourceUrlRaw ¶
func (*Gitlab) Runner ¶
Get a single runner.
GET /runners/:id
Parameters:
id The ID of a runner
Usage:
runner, err := gitlab.Runner(your_runner_id) if err != nil { fmt.Println(err.Error()) } fmt.Printf("%+v\n", runner)
func (*Gitlab) Runners ¶
Get all runners owned by the authenticated user.
GET /runners/:id
Parameters:
id The ID of a runner
Usage:
runner, err := gitlab.Runner(your_runner_id) if err != nil { fmt.Println(err.Error()) } fmt.Printf("%+v\n", runner)
func (*Gitlab) SearchNamespaces ¶
func (*Gitlab) UpdateGroup ¶
Updates the project group. Only available to group owners and administrators.
func (*Gitlab) UpdateProject ¶
Update a specific project, identified by project ID or NAME, which is owned by the authentication user. Namespaced project may be retrieved by specifying the namespace and its project name like this:
`namespace%2Fproject-name`
func (*Gitlab) UpdateRunner ¶
Update a specific runner, identified by runner ID, which is owned by the authentication user.
type Group ¶
type Group struct { Id int `json:"id,omitempty"` Name string `json:"name,omitempty"` Path string `json:"path,omitempty"` Description string `json:"description,omitempty"` Visibility Visibility `json:"visibility,omitempty"` LfsEnabled bool `json:"lfs_enabled,omitempty"` AvatarUrl string `json:"avatar_url,omitempty"` WebURL string `json:"web_url,omitempty"` RequestAccessEnabled bool `json:"request_access_enabled,omitempty"` FullName string `json:"full_name,omitempty"` FullPath string `json:"full_path,omitempty"` ParentId int `json:"parent_id,omitempty"` Projects []*Project `json:"projects,omitempty"` }
A gitlab group
type HookObjAttr ¶
type HookObjAttr struct { Id int `json:"id,omitempty"` Ref string `json:"ref,omitempty"` Tag bool `json:"tag,omitempty"` Sha string `json:"sha,omitempty"` BeforeSha string `json:"before_sha,omitempty"` Title string `json:"title,omitempty"` AssigneeId int `json:"assignee_id,omitempty"` AuthorId int `json:"author_id,omitempty"` ProjectId int `json:"project_id,omitempty"` Status string `json:"status,omitempty"` Stages []string `json:"stages,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` FinishedAt time.Time `json:"finished_at,omitempty"` Duration int `json:"duration,omitempty"` Position int `json:"position,omitempty"` BranchName string `json:"branch_name,omitempty"` Description string `json:"description,omitempty"` MilestoneId int `json:"milestone_id,omitempty"` State string `json:"state,omitempty"` IId int `json:"iid,omitempty"` TargetBranch string `json:"target_branch,omitempty"` SourceBranch string `json:"source_branch,omitempty"` SourceProjectId int `json:"source_project_id,omitempty"` StCommits string `json:"st_commits,omitempty"` StDiffs string `json:"st_diffs,omitempty"` MergeStatus string `json:"merge_status,omitempty"` TargetProjectId int `json:"target_project_id,omitempty"` }
type HookPayload ¶
type HookPayload struct { Before string `json:"before,omitempty"` After string `json:"after,omitempty"` Ref string `json:"ref,omitempty"` UserId int `json:"user_id,omitempty"` UserName string `json:"user_name,omitempty"` ProjectId int `json:"project_id,omitempty"` Project *hProject `json:"project,omitempty"` Repository *hRepository `json:"repository,omitempty"` Commits []hCommit `json:"commits,omitempty"` Commit *hCommit `json:"commit,omitempty"` TotalCommitsCount int `json:"total_commits_count,omitempty"` ObjectKind string `json:"object_kind,omitempty"` ObjectAttributes *HookObjAttr `json:"object_attributes,omitempty"` Builds []*Build `json:"builds,omitempty"` }
func ParseHook ¶
func ParseHook(payload []byte) (*HookPayload, error)
ParseHook parses hook payload from GitLab
func (*HookPayload) Branch ¶
func (h *HookPayload) Branch() string
Branch returns current branch for pipeline and push event hook payload This function returns empty string for any other events
func (*HookPayload) Head ¶
func (h *HookPayload) Head() hCommit
Head returns the latest changeset for push event hook payload
type Issue ¶
type Issue struct { Id int `json:"id"` IId int `json:"iid"` ProjectId int `json:"project_id,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` Labels []string `json:"labels,omitempty"` Milestone *Milestone `json:"milestone,omitempty"` Assignee *User `json:"assignee,omitempty"` Author *User `json:"author,omitempty"` State string `json:"state,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` }
type IssueRequest ¶
type MergeRequest ¶
type MergeRequest struct { Id int `json:"id,omitempty"` Iid int `json:"iid,omitempty"` TargetBranch string `json:"target_branch,omitempty"` SourceBranch string `json:"source_branch,omitempty"` ProjectId int `json:"project_id,omitempty"` Title string `json:"title,omitempty"` State string `json:"state,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` Upvotes int `json:"upvotes,omitempty"` Downvotes int `json:"downvotes,omitempty"` Author *User `json:"author,omitempty"` Assignee *User `json:"assignee,omitempty"` Description string `json:"description,omitempty"` WorkInProgress bool `json:"work_in_progress,omitempty"` MergeStatus string `json:"merge_status,omitempty"` SourceProjectID int `json:"source_project_id,omitempty"` TargetProjectID int `json:"target_project_id,omitempty"` }
type MergeRequestChanges ¶
type MergeRequestChanges struct { *MergeRequest CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,omitempty"` SourceProjectId int `json:"source_project_id,omitempty"` TargetProjectId int `json:"target_project_id,omitempty"` Labels []string `json:"labels,omitempty"` Milestone Milestone `json:"milestone,omitempty"` Changes []ChangeItem `json:"changes,omitempty"` }
type Milestone ¶
type Milestone struct { Id int `json:"id,omitempty"` IId int `json:"iid,omitempty"` ProjectId int `json:"project_id,omitempty"` Title string `json:"title,omitempty"` Description string `json:"description,omitempty"` DueDate string `json:"due_date,omitempty"` State string `json:"state,omitempty"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at,omitempty"` }
type Project ¶
type Project struct { Id int `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` DefaultBranch string `json:"default_branch,omitempty"` Owner *Member `json:"owner,omitempty"` Public bool `json:"public,omitempty"` Path string `json:"path,omitempty"` PathWithNamespace string `json:"path_with_namespace,omitempty"` Visibility Visibility `json:"visibility,omitempty"` IssuesEnabled bool `json:"issues_enabled,omitempty"` MergeRequestsEnabled bool `json:"merge_requests_enabled,omitempty"` WallEnabled bool `json:"wall_enabled,omitempty"` WikiEnabled bool `json:"wiki_enabled,omitempty"` CreatedAtRaw string `json:"created_at,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` NamespaceId int `json:"namespace_id,omitempty"` // Only used for create SshRepoUrl string `json:"ssh_url_to_repo"` HttpRepoUrl string `json:"http_url_to_repo"` WebUrl string `json:"web_url"` }
A gitlab project
type Runner ¶
type Runner struct { Id int `json:"id,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Token string `json:"token,omitempty"` Revision string `json:"revision,omitempty"` ContactedAt string `json:"contacted_at,omitempty"` Platform string `json:"platform,omitempty"` Version string `json:"version,omitempty"` Architecture string `json:"architecture,omitempty"` Projects []*Project `json:"projects,omitempty"` TagList []string `json:"tag_list,omitempty"` Active bool `json:"active,omitempty"` }
type Tag ¶
type Tag struct { Name string `json:"name,omitempty"` Protected bool `json:"protected,omitempty"` Commit *BranchCommit `json:"commit,omitempty"` }
type User ¶
type User struct { Id int `json:"id,omitempty"` Username string `json:"username,omitempty"` Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` State string `json:"state,omitempty"` CreatedAt string `json:"created_at,omitempty"` Bio string `json:"bio,omitempty"` Skype string `json:"skype,omitempty"` LinkedIn string `json:"linkedin,omitempty"` Twitter string `json:"twitter,omitempty"` WebURL string `json:"web_url"` ExternUid string `json:"extern_uid,omitempty"` Provider string `json:"provider,omitempty"` ThemeId int `json:"theme_id,omitempty"` ColorSchemeId int `json:"color_scheme_id,omitempty"` AvatarUrl string `json:"avatar_url,omitempty"` }
type Visibility ¶
type Visibility string