Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) GetArchive(project *Project, ref string) ([]byte, error)
- func (c *Client) GetFile(project *Project, path, ref string) ([]byte, error)
- func (c *Client) GetProjectById(projectId int) (*Project, error)
- func (c *Client) GetProjectList() ([]*Project, error)
- func (c *Client) GetTagList(project *Project) ([]*Tag, error)
- type File
- type Project
- type Tag
Constants ¶
This section is empty.
Variables ¶
var ( // ErrGitLabInvalidToken = errors.New("Invalid Token") // ErrGitLabInvalidEndpoint = errors.New("Invalid GitLab endpoint") )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { HasV4Support bool HasV3Support bool Endpoint string Token string APIPrefix string }
func (*Client) GetArchive ¶
@see https://gitlab.com/gitlab-org/gitlab-ce/blob/8-5-stable/doc/api/repositories.md#get-file-archive @see https://docs.gitlab.com/ee/api/repositories.html#get-file-archive
func (*Client) GetFile ¶
@see https://gitlab.com/gitlab-org/gitlab-ce/blob/8-5-stable/doc/api/repository_files.md#get-file-from-repository for v3 file_path should be QueryString parameter.
@see https://docs.gitlab.com/ee/api/repository_files.html#get-file-from-repository for v4 file_path is not a parameter but part of URI. Should be encoded anyway. update, right now this one doesn't seem's to work.
GitLab < v9.4.2: v4 method doesn't work as documented, uses v3 signature. GitLab >= v9.4.2: v4 work as documented.
To maintain compatibility between all v3, v4-pre and v4 versions, one extra HEAD request should be executed.
func (*Client) GetProjectById ¶
@see https://gitlab.com/gitlab-org/gitlab-ce/blob/8-5-stable/doc/api/projects.md#get-single-project @see https://docs.gitlab.com/ee/api/projects.html#get-single-project
func (*Client) GetProjectList ¶
@see https://gitlab.com/gitlab-org/gitlab-ce/blob/8-5-stable/doc/api/projects.md#list-projects https://docs.gitlab.com/ee/api/projects.html#list-projects