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 ¶
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 ¶
AddUserSSHKey
func (*Wrapper) CheckProjectExists ¶
CheckProjectExists within a parent group
func (*Wrapper) CreateGroupDeployToken ¶
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 ¶
func (gl *Wrapper) CreateProjectDeployToken(projectName string, p *DeployTokenCreateParameters) (string, error)
CreateProjectDeployToken
func (*Wrapper) DeleteContainerRegistryRepository ¶
DeleteProjectContainerRegistryRepository
func (*Wrapper) DeleteGroupRunners ¶
DeleteGroupRunners deletes provided runners for a parent group
func (*Wrapper) DeleteProjectWebhook ¶
DeleteProjectWebhook
func (*Wrapper) DeleteUserSSHKey ¶
DeleteUserSSHKey
func (*Wrapper) GetProjectContainerRegistryRepositories ¶
func (gl *Wrapper) GetProjectContainerRegistryRepositories(projectName string) ([]gitlab.RegistryRepository, error)
GetProjectContainerRegistryRepositories
func (*Wrapper) GetProjectID ¶
GetProjectID returns a project's ID scoped to the parent group
func (*Wrapper) GetProjects ¶
GetProjects for a specific parent group by ID
func (*Wrapper) GetSubGroups ¶
GetSubGroups for a specific parent group by ID
func (*Wrapper) GetUserSSHKeys ¶
GetUserSSHKeys
func (*Wrapper) ListGroupDeployTokens ¶
ListGroupDeployTokens
func (*Wrapper) ListGroupRunners ¶
ListGroupRunners returns all registered runners for a parent group
func (*Wrapper) ListProjectDeployTokens ¶
ListProjectDeployTokens
func (*Wrapper) ListProjectWebhooks ¶
ListProjectWebhooks returns all webhooks for a project