Documentation ¶
Overview ¶
Package gitlab provides an implementation of the provider.Client interface for the GitLab REST API.
Index ¶
- type Client
- func (g *Client) Groups(tok string) ([]int64, error)
- func (g *Client) Repos(tok string, page int64) ([]*provider.Repo, database.Paginator, error)
- func (g *Client) SetCommitStatus(tok string, r *provider.Repo, status runner.Status, url, sha string) error
- func (g *Client) ToggleRepo(tok string, r *provider.Repo) error
- func (g *Client) VerifyRequest(r io.Reader, signature string) ([]byte, error)
- type MergeRequestEvent
- type PushEvent
- type Repo
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
provider.BaseClient
}
func New ¶
New returns a new Client to the GitLab REST API. If the given endpoint is empty then the default "https://gitlab.com/api/v4" will be used. This will set the following scopes to request: "api".
func (*Client) SetCommitStatus ¶
func (g *Client) SetCommitStatus(tok string, r *provider.Repo, status runner.Status, url, sha string) error
SetCommitStatus implements the provider.Client interface.
func (*Client) ToggleRepo ¶
ToggleRepo implements the provider.Client interface.
type MergeRequestEvent ¶
type MergeRequestEvent struct { User User Project Repo Attrs struct { ID int64 `json:"iid"` TargetBranch string `json:"target_branch"` SourceProjectID int64 `json:"source_project_id"` TargetProjectID int64 `json:"target_project_id"` AuthorID int64 `json:"author_id"` Title string Source struct { WebURL string `json:"web_url"` } LastCommit struct { ID string } `json:"last_commit"` URL string Action string } `json:"object_attributes"` }
Click to show internal directories.
Click to hide internal directories.