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 GitLabWrapper
- func (gl *GitLabWrapper) AddUserSSHKey(keyTitle string, keyValue string) error
- func (gl *GitLabWrapper) CheckProjectExists(projectName string) (bool, error)
- func (gl *GitLabWrapper) CreateGroupDeployToken(groupID int, p *DeployTokenCreateParameters) (string, error)
- func (gl *GitLabWrapper) CreateProjectDeployToken(projectName string, p *DeployTokenCreateParameters) (string, error)
- func (gl *GitLabWrapper) DeleteContainerRegistryRepository(projectName string, repositoryID int) error
- func (gl *GitLabWrapper) DeleteGroupRunners(runners []gitlab.Runner) error
- func (gl *GitLabWrapper) DeleteProjectWebhook(projectName string, url string) error
- func (gl *GitLabWrapper) DeleteUserSSHKey(keyTitle string) error
- func (gl *GitLabWrapper) GetProjectContainerRegistryRepositories(projectName string) ([]gitlab.RegistryRepository, error)
- func (gl *GitLabWrapper) GetProjectID(projectName string) (int, error)
- func (gl *GitLabWrapper) GetProjects() ([]gitlab.Project, error)
- func (gl *GitLabWrapper) GetSubGroups() ([]gitlab.Group, error)
- func (gl *GitLabWrapper) GetUserSSHKeys() ([]*gitlab.SSHKey, error)
- func (gl *GitLabWrapper) ListGroupDeployTokens(groupID int) ([]gitlab.DeployToken, error)
- func (gl *GitLabWrapper) ListGroupRunners() ([]gitlab.Runner, error)
- func (gl *GitLabWrapper) ListProjectDeployTokens(projectName string) ([]gitlab.DeployToken, error)
- func (gl *GitLabWrapper) 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 GitLabWrapper ¶
GitLabWrapper holds gitlab cloud client info and provides and interface to its functions
func NewGitLabClient ¶
func NewGitLabClient(token string, parentGroupName string) (GitLabWrapper, error)
NewGitLabClient instantiates a wrapper to communicate with GitLab It sets the path and ID of the group under which resources will be managed
func (*GitLabWrapper) AddUserSSHKey ¶
func (gl *GitLabWrapper) AddUserSSHKey(keyTitle string, keyValue string) error
AddUserSSHKey
func (*GitLabWrapper) CheckProjectExists ¶
func (gl *GitLabWrapper) CheckProjectExists(projectName string) (bool, error)
CheckProjectExists within a parent group
func (*GitLabWrapper) CreateGroupDeployToken ¶ added in v0.1.7
func (gl *GitLabWrapper) 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 (*GitLabWrapper) CreateProjectDeployToken ¶
func (gl *GitLabWrapper) CreateProjectDeployToken(projectName string, p *DeployTokenCreateParameters) (string, error)
CreateProjectDeployToken
func (*GitLabWrapper) DeleteContainerRegistryRepository ¶
func (gl *GitLabWrapper) DeleteContainerRegistryRepository(projectName string, repositoryID int) error
DeleteProjectContainerRegistryRepository
func (*GitLabWrapper) DeleteGroupRunners ¶
func (gl *GitLabWrapper) DeleteGroupRunners(runners []gitlab.Runner) error
DeleteGroupRunners deletes provided runners for a parent group
func (*GitLabWrapper) DeleteProjectWebhook ¶
func (gl *GitLabWrapper) DeleteProjectWebhook(projectName string, url string) error
DeleteProjectWebhook
func (*GitLabWrapper) DeleteUserSSHKey ¶
func (gl *GitLabWrapper) DeleteUserSSHKey(keyTitle string) error
DeleteUserSSHKey
func (*GitLabWrapper) GetProjectContainerRegistryRepositories ¶
func (gl *GitLabWrapper) GetProjectContainerRegistryRepositories(projectName string) ([]gitlab.RegistryRepository, error)
GetProjectContainerRegistryRepositories
func (*GitLabWrapper) GetProjectID ¶
func (gl *GitLabWrapper) GetProjectID(projectName string) (int, error)
GetProjectID returns a project's ID scoped to the parent group
func (*GitLabWrapper) GetProjects ¶
func (gl *GitLabWrapper) GetProjects() ([]gitlab.Project, error)
GetProjects for a specific parent group by ID
func (*GitLabWrapper) GetSubGroups ¶
func (gl *GitLabWrapper) GetSubGroups() ([]gitlab.Group, error)
GetSubGroups for a specific parent group by ID
func (*GitLabWrapper) GetUserSSHKeys ¶
func (gl *GitLabWrapper) GetUserSSHKeys() ([]*gitlab.SSHKey, error)
GetUserSSHKeys
func (*GitLabWrapper) ListGroupDeployTokens ¶ added in v0.1.7
func (gl *GitLabWrapper) ListGroupDeployTokens(groupID int) ([]gitlab.DeployToken, error)
ListGroupDeployTokens
func (*GitLabWrapper) ListGroupRunners ¶
func (gl *GitLabWrapper) ListGroupRunners() ([]gitlab.Runner, error)
ListGroupRunners returns all registered runners for a parent group
func (*GitLabWrapper) ListProjectDeployTokens ¶
func (gl *GitLabWrapper) ListProjectDeployTokens(projectName string) ([]gitlab.DeployToken, error)
ListProjectDeployTokens
func (*GitLabWrapper) ListProjectWebhooks ¶
func (gl *GitLabWrapper) ListProjectWebhooks(projectID int) ([]gitlab.ProjectHook, error)
ListProjectWebhooks returns all webhooks for a project