{"modulePath":"github.com/projectsyn/lieutenant-operator","version":"v1.13.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package gitlab\n\n## Variables\n\n```go\nvar ListItemsPerPage int64 = 100\n```\n\n## Types\n\n```go\ntype Gitlab struct {\n\t// contains filtered or unexported fields\n}\n```\nGitlab holds the necessary information to communincate with a Gitlab server. Each Gitlab instance will handle exactly one project.\n\n```go\nfunc (g *Gitlab) CommitTemplateFiles() error\n```\nCommitTemplateFiles uploads all defined template files onto the repository.\n\n```go\nfunc (g *Gitlab) Connect() error\n```\nConnect creates the Gitlab client\n\n```go\nfunc (g *Gitlab) Create() error\n```\nCreate will create a new Gitlab project\n\n```go\nfunc (g *Gitlab) EnsureCIVariables(ctx context.Context, managedVariables []string, variables []manager.EnvVar) error\n```\nEnsureCIVariables ensures that the given variables are set in the CI/CD pipeline. The managedVariables is used to identify the variables that are managed by the operator. Variables that are not managed by the operator will be ignored. Variables that are managed but not in variables will be deleted.\n\n```go\nfunc (g *Gitlab) EnsureProjectAccessToken(ctx context.Context, name string, opts manager.EnsureProjectAccessTokenOptions) (manager.ProjectAccessToken, error)\n```\nEnsureProjectAccessToken ensures that the project has an access token set. If the token is expired or not set, a new token will be created. This implementation does not use the Gitlab token rotation feature. Using this feature would invalidate old tokens immediately, which would break pipelines. Also the newly created token would immediately be revoked if an old one is used.\n\n```go\nfunc (g *Gitlab) FullURL() *url.URL\n```\nFullURL returns the complete url of this git repository\n\n```go\nfunc (g *Gitlab) IsType(_ *url.URL) (bool, error)\n```\nTODO: this will be deprecated in favour of a fixed type definition in the CRD. As there's currently only the GitLab implementation this is a workaround for the brittle detection.\n\n```go\nfunc (g *Gitlab) New(options manager.RepoOptions) (manager.Repo, error)\n```\nNew returns a new and empty Gitlab implementation\n\n```go\nfunc (g *Gitlab) Read() error\n```\nRead reads the repository from the gitlab server and sets the object's state accordingly\n\n```go\nfunc (g *Gitlab) Remove() error\n```\nRemove removes the project according to the recycle policy. Delete -\u003e project gets deleted Archive -\u003e project gets archived Retain -\u003e nothing happens\n\n```go\nfunc (g *Gitlab) Type() string\n```\nType returns the type of this repo instance\n\n```go\nfunc (g *Gitlab) Update() (bool, error)\n```\nUpdate will update the Project Description and will overwrite the deployment keys on the endpoint that differ from the local ones.\n\n","path":"github.com/projectsyn/lieutenant-operator/git/gitlab","name":"gitlab","synopsis":"","isRedistributable":true}
