Documentation ¶
Index ¶
- Constants
- func UpdateGitlabToken(id int, accessToken string) (string, error)
- type AccessToken
- type Client
- func (c *Client) AddProjectHook(owner, repo string, hook *git.Hook) (*gitlab.ProjectHook, error)
- func (c *Client) Compare(projectID int, from, to string) ([]*gitlab.Diff, error)
- func (c *Client) DeleteProjectHook(owner, repo string, id int) error
- func (c *Client) GetFileContent(owner, repo, path, branch string) ([]byte, error)
- func (c *Client) GetLatestRepositoryCommit(owner, repo string, path, branch string) (*gitlab.Commit, error)
- func (c *Client) GetProjectID(owner, repo string) (int, error)
- func (c *Client) GetRawFile(owner, repo string, sha string, fileName string) ([]byte, error)
- func (c *Client) GetSingleCommitOfProject(owner, repo, commitSha string) (*gitlab.Commit, error)
- func (c *Client) GetTreeContents(owner, repo, path, branch string) (afero.Fs, error)
- func (c *Client) GetYAMLContents(owner, repo, path, branch string, isDir, split bool) ([]string, error)
- func (c *Client) ListBranches(owner, repo, key string, opts *ListOptions) ([]*gitlab.Branch, error)
- func (c *Client) ListChangedFiles(event *gitlab.MergeEvent) ([]string, error)
- func (c *Client) ListGroupProjects(namespace, keyword string, opts *ListOptions) ([]*gitlab.Project, error)
- func (c *Client) ListNamespaces(keyword string, opts *ListOptions) ([]*gitlab.Namespace, error)
- func (c *Client) ListOpenedProjectMergeRequests(owner, repo, targetBranch, key string, opts *ListOptions) ([]*gitlab.MergeRequest, error)
- func (c *Client) ListProjectHooks(owner, repo string, opts *ListOptions) ([]*gitlab.ProjectHook, error)
- func (c *Client) ListTags(owner, repo string, opts *ListOptions, key string) ([]*gitlab.Tag, error)
- func (c *Client) ListTree(owner, repo, path, branch string, recursive bool, opts *ListOptions) ([]*gitlab.TreeNode, error)
- func (c *Client) ListUserProjects(owner, keyword string, opts *ListOptions) ([]*gitlab.Project, error)
- func (c *Client) UpdateProjectHook(owner, repo string, id int, hook *git.Hook) (*gitlab.ProjectHook, error)
- type ListOptions
Constants ¶
View Source
const TokenExpirationThreshold int64 = 7000
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AccessToken ¶ added in v1.9.9
type Client ¶
type Client struct {
*gitlab.Client
}
func (*Client) AddProjectHook ¶
func (*Client) DeleteProjectHook ¶
func (*Client) GetFileContent ¶
func (*Client) GetLatestRepositoryCommit ¶ added in v1.4.0
func (*Client) GetRawFile ¶
func (*Client) GetSingleCommitOfProject ¶
func (*Client) GetTreeContents ¶ added in v1.4.0
GetTreeContents recursively gets all file contents under the given path, and writes to an in-memory file system.
func (*Client) GetYAMLContents ¶ added in v1.4.0
func (c *Client) GetYAMLContents(owner, repo, path, branch string, isDir, split bool) ([]string, error)
GetYAMLContents recursively gets all yaml contents under the given path. if split is true, manifests in the same file will be split to separated ones.
func (*Client) ListBranches ¶
func (c *Client) ListBranches(owner, repo, key string, opts *ListOptions) ([]*gitlab.Branch, error)
ListBranches lists branches by projectID <- urlEncode(namespace/projectName)
func (*Client) ListChangedFiles ¶
func (*Client) ListGroupProjects ¶
func (c *Client) ListGroupProjects(namespace, keyword string, opts *ListOptions) ([]*gitlab.Project, error)
func (*Client) ListNamespaces ¶
func (c *Client) ListNamespaces(keyword string, opts *ListOptions) ([]*gitlab.Namespace, error)
func (*Client) ListOpenedProjectMergeRequests ¶
func (c *Client) ListOpenedProjectMergeRequests(owner, repo, targetBranch, key string, opts *ListOptions) ([]*gitlab.MergeRequest, error)
func (*Client) ListProjectHooks ¶
func (c *Client) ListProjectHooks(owner, repo string, opts *ListOptions) ([]*gitlab.ProjectHook, error)
func (*Client) ListTags ¶
func (c *Client) ListTags(owner, repo string, opts *ListOptions, key string) ([]*gitlab.Tag, error)
ListTags lists branches by projectID <- urlEncode(namespace/projectName)
func (*Client) ListTree ¶
func (c *Client) ListTree(owner, repo, path, branch string, recursive bool, opts *ListOptions) ([]*gitlab.TreeNode, error)
func (*Client) ListUserProjects ¶
func (c *Client) ListUserProjects(owner, keyword string, opts *ListOptions) ([]*gitlab.Project, error)
type ListOptions ¶
Click to show internal directories.
Click to hide internal directories.