Documentation ¶
Index ¶
- type Client
- func (c *Client) AddDroneService(id string, params QMap) error
- func (g *Client) AllGroups() ([]*Namespace, error)
- func (g *Client) AllProjects(hide_archives bool) ([]*Project, error)
- func (c *Client) CurrentUser() (User, error)
- func (c *Client) DeleteDroneService(id string) error
- func (c *Client) Do(method, url, opaque string, body []byte) ([]byte, error)
- func (g *Client) Groups(page, perPage int) ([]*Namespace, error)
- func (c *Client) Project(id string) (*Project, error)
- func (c *Client) Projects(page int, per_page int, hide_archives bool) ([]*Project, error)
- func (c *Client) RepoRawFile(id, sha, filepath string) ([]byte, error)
- func (c *Client) RepoRawFileRef(id, ref, filepath string) ([]byte, error)
- func (c *Client) ResourceUrl(u string, params, query QMap) (string, string)
- func (c *Client) SearchProjectId(namespace string, name string) (id int, err error)
- func (c *Client) SetStatus(id, sha, state, desc, ref, link string) error
- type GroupAccess
- type HookObjAttr
- type HookPayload
- type Member
- type Namespace
- type Permissions
- type Person
- type Project
- type ProjectAccess
- type QMap
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) AllProjects ¶
Get a list of all projects owned by the authenticated user.
func (*Client) CurrentUser ¶
func (*Client) DeleteDroneService ¶
func (*Client) RepoRawFile ¶
Get Raw file content
func (*Client) RepoRawFileRef ¶
func (*Client) ResourceUrl ¶
func (*Client) SearchProjectId ¶
Get a list of projects by query owned by the authenticated user.
type GroupAccess ¶
type HookObjAttr ¶
type HookObjAttr struct { Id int `json:"id,omitempty"` Title string `json:"title,omitempty"` AssigneeId int `json:"assignee_id,omitempty"` AuthorId int `json:"author_id,omitempty"` ProjectId int `json:"project_id,omitempty"` CreatedAt string `json:"created_at,omitempty"` UpdatedAt string `json:"updated_at,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"` Url string `json:"url,omiyempty"` Source *hProject `json:"source,omitempty"` Target *hProject `json:"target,omitempty"` LastCommit *hCommit `json:"last_commit,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"` TotalCommitsCount int `json:"total_commits_count,omitempty"` ObjectKind string `json:"object_kind,omitempty"` ObjectAttributes *HookObjAttr `json:"object_attributes,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 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
func (*HookPayload) Tag ¶
func (h *HookPayload) Tag() string
Tag returns current tag for push event hook payload This function returns empty string for any other events
type Permissions ¶
type Permissions struct { ProjectAccess *ProjectAccess `json:"project_access,omitempty"` GroupAccess *GroupAccess `json:"group_access,omitempty"` }
type Project ¶
type Project struct { Id int `json:"id,omitempty"` Owner *Member `json:"owner,omitempty"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` DefaultBranch string `json:"default_branch,omitempty"` Public bool `json:"public,omitempty"` Path string `json:"path,omitempty"` PathWithNamespace string `json:"path_with_namespace,omitempty"` Namespace *Namespace `json:"namespace,omitempty"` SshRepoUrl string `json:"ssh_url_to_repo"` HttpRepoUrl string `json:"http_url_to_repo"` Url string `json:"web_url"` AvatarUrl string `json:"avatar_url"` Permissions *Permissions `json:"permissions,omitempty"` }
type ProjectAccess ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.