{"modulePath":"github.com/koderover/zadig","version":"v1.18.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gitlab\n\n## Constants\n\n```go\nconst TokenExpirationThreshold int64 = 7000\n```\n\n## Functions\n\n```go\nfunc UpdateGitlabToken(id int, accessToken string) (string, error)\n```\n\n## Types\n\n```go\ntype AccessToken struct {\n\tAccessToken  string `json:\"access_token\"`\n\tTokenType    string `json:\"token_type\"`\n\tExpiresIn    int    `json:\"expires_in\"`\n\tRefreshToken string `json:\"refresh_token\"`\n\tScope        string `json:\"scope\"`\n\tCreatedAt    int    `json:\"created_at\"`\n}\n```\n\n```go\ntype Client struct {\n\t*gitlab.Client\n}\n```\n\n```go\nfunc NewClient(id int, address, accessToken, proxyAddr string, enableProxy bool) (*Client, error)\n```\n\n```go\nfunc (c *Client) AddProjectHook(owner, repo string, hook *git.Hook) (*gitlab.ProjectHook, error)\n```\n\n```go\nfunc (c *Client) Compare(projectID int, from, to string) ([]*gitlab.Diff, error)\n```\n\n```go\nfunc (c *Client) DeleteProjectHook(owner, repo string, id int) error\n```\n\n```go\nfunc (c *Client) GetFileContent(owner, repo, path, branch string) ([]byte, error)\n```\n\n```go\nfunc (c *Client) GetLatestRepositoryCommit(owner, repo string, path, branch string) (*gitlab.Commit, error)\n```\n\n```go\nfunc (c *Client) GetProjectID(owner, repo string) (int, error)\n```\n\n```go\nfunc (c *Client) GetRawFile(owner, repo string, sha string, fileName string) ([]byte, error)\n```\n\n```go\nfunc (c *Client) GetSingleCommitOfProject(owner, repo, commitSha string) (*gitlab.Commit, error)\n```\n\n```go\nfunc (c *Client) GetTreeContents(owner, repo, path, branch string) (afero.Fs, error)\n```\nGetTreeContents recursively gets all file contents under the given path, and writes to an in-memory file system.\n\n```go\nfunc (c *Client) GetYAMLContents(owner, repo, path, branch string, isDir, split bool) ([]string, error)\n```\nGetYAMLContents recursively gets all yaml contents under the given path. if split is true, manifests in the same file will be split to separated ones.\n\n```go\nfunc (c *Client) ListBranches(owner, repo, key string, opts *ListOptions) ([]*gitlab.Branch, error)\n```\nListBranches lists branches by projectID \\\u003c- urlEncode(namespace/projectName)\n\n```go\nfunc (c *Client) ListChangedFiles(event *gitlab.MergeEvent) ([]string, error)\n```\n\n```go\nfunc (c *Client) ListGroupProjects(namespace, keyword string, opts *ListOptions) ([]*gitlab.Project, error)\n```\n\n```go\nfunc (c *Client) ListNamespaces(keyword string, opts *ListOptions) ([]*gitlab.Namespace, error)\n```\n\n```go\nfunc (c *Client) ListOpenedProjectMergeRequests(owner, repo, targetBranch, key string, opts *ListOptions) ([]*gitlab.MergeRequest, error)\n```\n\n```go\nfunc (c *Client) ListProjectHooks(owner, repo string, opts *ListOptions) ([]*gitlab.ProjectHook, error)\n```\n\n```go\nfunc (c *Client) ListTags(owner, repo string, opts *ListOptions, key string) ([]*gitlab.Tag, error)\n```\nListTags lists branches by projectID \\\u003c- urlEncode(namespace/projectName)\n\n```go\nfunc (c *Client) ListTree(owner, repo, path, branch string, recursive bool, opts *ListOptions) ([]*gitlab.TreeNode, error)\n```\n\n```go\nfunc (c *Client) ListUserProjects(owner, keyword string, opts *ListOptions) ([]*gitlab.Project, error)\n```\n\n```go\nfunc (c *Client) UpdateProjectHook(owner, repo string, id int, hook *git.Hook) (*gitlab.ProjectHook, error)\n```\n\n```go\ntype ListOptions struct {\n\t// Page number of the results to fetch. Default: 1\n\tPage int\n\t// Results per page (max 100). Default: 30\n\tPerPage int\n\n\t// NoPaginated indicates if we need to fetch all result or just one page. True means fetching just one page\n\tNoPaginated bool\n}\n```\n\n","path":"github.com/koderover/zadig/pkg/tool/git/gitlab","name":"gitlab","synopsis":"","isRedistributable":true}
