Documentation ¶
Overview ¶
Copyright (C) 2021-2023, Kubefirst
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Copyright (C) 2021-2023, Kubefirst ¶
This program is licensed under MIT. See the LICENSE file for more details.
Index ¶
- func VerifyTokenPermissions(gitlabToken string) error
- type DeployTokenCreateParameters
- type Wrapper
- func (gl *Wrapper) AddUserSSHKey(keyTitle string, keyValue string) error
- func (gl *Wrapper) CheckProjectExists(projectName string) (bool, error)
- func (gl *Wrapper) CreateGroupDeployToken(groupID int, p *DeployTokenCreateParameters) (string, error)
- func (gl *Wrapper) CreateProjectDeployToken(projectName string, p *DeployTokenCreateParameters) (string, error)
- func (gl *Wrapper) DeleteContainerRegistryRepository(projectName string, repositoryID int) error
- func (gl *Wrapper) DeleteGroupRunners(runners []gitlab.Runner) error
- func (gl *Wrapper) DeleteProjectWebhook(projectName string, url string) error
- func (gl *Wrapper) DeleteUserSSHKey(keyTitle string) error
- func (gl *Wrapper) GetProjectContainerRegistryRepositories(projectName string) ([]gitlab.RegistryRepository, error)
- func (gl *Wrapper) GetProjectID(projectName string) (int, error)
- func (gl *Wrapper) GetProjects() ([]gitlab.Project, error)
- func (gl *Wrapper) GetSubGroups() ([]gitlab.Group, error)
- func (gl *Wrapper) GetUserSSHKeys() ([]*gitlab.SSHKey, error)
- func (gl *Wrapper) ListGroupDeployTokens(groupID int) ([]gitlab.DeployToken, error)
- func (gl *Wrapper) ListGroupRunners() ([]gitlab.Runner, error)
- func (gl *Wrapper) ListProjectDeployTokens(projectName string) ([]gitlab.DeployToken, error)
- func (gl *Wrapper) ListProjectWebhooks(projectID int) ([]gitlab.ProjectHook, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func VerifyTokenPermissions ¶
VerifyTokenPermissions compares scope of the provided token to the required scopes for kubefirst functionality
Types ¶
type DeployTokenCreateParameters ¶
DeployTokenCreateParameters holds values to be passed to a function to create deploy tokens
type Wrapper ¶ added in v0.106.0
Wrapper holds gitlab cloud client info and provides and interface to its functions
func NewGitLabClient ¶
NewGitLabClient instantiates a wrapper to communicate with GitLab It sets the path and ID of the group under which resources will be managed
func (*Wrapper) AddUserSSHKey ¶ added in v0.106.0
AddUserSSHKey
func (*Wrapper) CheckProjectExists ¶ added in v0.106.0
CheckProjectExists within a parent group
func (*Wrapper) CreateGroupDeployToken ¶ added in v0.106.0
func (gl *Wrapper) CreateGroupDeployToken(groupID int, p *DeployTokenCreateParameters) (string, error)
CreateGroupDeployToken creates a deploy token for a group If no groupID (0 by default) argument is provided, the parent group ID is used If a group deploy token already exists, it will be deleted and recreated
func (*Wrapper) CreateProjectDeployToken ¶ added in v0.106.0
func (gl *Wrapper) CreateProjectDeployToken(projectName string, p *DeployTokenCreateParameters) (string, error)
CreateProjectDeployToken
func (*Wrapper) DeleteContainerRegistryRepository ¶ added in v0.106.0
DeleteProjectContainerRegistryRepository
func (*Wrapper) DeleteGroupRunners ¶ added in v0.106.0
DeleteGroupRunners deletes provided runners for a parent group
func (*Wrapper) DeleteProjectWebhook ¶ added in v0.106.0
DeleteProjectWebhook
func (*Wrapper) DeleteUserSSHKey ¶ added in v0.106.0
DeleteUserSSHKey
func (*Wrapper) GetProjectContainerRegistryRepositories ¶ added in v0.106.0
func (gl *Wrapper) GetProjectContainerRegistryRepositories(projectName string) ([]gitlab.RegistryRepository, error)
GetProjectContainerRegistryRepositories
func (*Wrapper) GetProjectID ¶ added in v0.106.0
GetProjectID returns a project's ID scoped to the parent group
func (*Wrapper) GetProjects ¶ added in v0.106.0
GetProjects for a specific parent group by ID
func (*Wrapper) GetSubGroups ¶ added in v0.106.0
GetSubGroups for a specific parent group by ID
func (*Wrapper) GetUserSSHKeys ¶ added in v0.106.0
GetUserSSHKeys
func (*Wrapper) ListGroupDeployTokens ¶ added in v0.106.0
ListGroupDeployTokens
func (*Wrapper) ListGroupRunners ¶ added in v0.106.0
ListGroupRunners returns all registered runners for a parent group
func (*Wrapper) ListProjectDeployTokens ¶ added in v0.106.0
ListProjectDeployTokens
func (*Wrapper) ListProjectWebhooks ¶ added in v0.106.0
ListProjectWebhooks returns all webhooks for a project