projects

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAddMemberOptions

func GenerateAddMemberOptions(p *v1alpha1.MemberParameters) *gitlab.AddProjectMemberOptions

GenerateAddMemberOptions generates project member add options

func GenerateCreateHookOptions

func GenerateCreateHookOptions(p *v1alpha1.HookParameters) *gitlab.AddProjectHookOptions

GenerateCreateHookOptions generates project creation options

func GenerateCreateProjectDeployTokenOptions

func GenerateCreateProjectDeployTokenOptions(name string, p *v1alpha1.DeployTokenParameters) *gitlab.CreateProjectDeployTokenOptions

GenerateCreateProjectDeployTokenOptions generates project creation options

func GenerateCreateProjectOptions

func GenerateCreateProjectOptions(name string, p *v1alpha1.ProjectParameters) *gitlab.CreateProjectOptions

GenerateCreateProjectOptions generates project creation options

func GenerateCreateVariableOptions

func GenerateCreateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.CreateProjectVariableOptions

GenerateCreateVariableOptions generates project creation options

func GenerateEditHookOptions

func GenerateEditHookOptions(p *v1alpha1.HookParameters) *gitlab.EditProjectHookOptions

GenerateEditHookOptions generates project edit options

func GenerateEditMemberOptions

func GenerateEditMemberOptions(p *v1alpha1.MemberParameters) *gitlab.EditProjectMemberOptions

GenerateEditMemberOptions generates project member edit options

func GenerateEditProjectOptions

func GenerateEditProjectOptions(name string, p *v1alpha1.ProjectParameters) *gitlab.EditProjectOptions

GenerateEditProjectOptions generates project edit options

func GenerateHookObservation

func GenerateHookObservation(hook *gitlab.ProjectHook) v1alpha1.HookObservation

GenerateHookObservation is used to produce v1alpha1.HookObservation from gitlab.Hook.

func GenerateMemberObservation

func GenerateMemberObservation(projectMember *gitlab.ProjectMember) v1alpha1.MemberObservation

GenerateMemberObservation is used to produce v1alpha1.MemberObservation from gitlab.Member.

func GenerateObservation

func GenerateObservation(prj *gitlab.Project) v1alpha1.ProjectObservation

GenerateObservation is used to produce v1alpha1.ProjectObservation from gitlab.Project.

func GenerateUpdateVariableOptions

func GenerateUpdateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.UpdateProjectVariableOptions

GenerateUpdateVariableOptions generates project update options

func IsErrorHookNotFound

func IsErrorHookNotFound(err error) bool

IsErrorHookNotFound helper function to test for errProjectNotFound error.

func IsErrorMemberNotFound

func IsErrorMemberNotFound(err error) bool

IsErrorMemberNotFound helper function to test for errMemberNotFound error.

func IsErrorProjectDeployTokenNotFound

func IsErrorProjectDeployTokenNotFound(err error) bool

IsErrorProjectDeployTokenNotFound helper function to test for errProjectDeployTokenNotFound error.

func IsErrorProjectNotFound

func IsErrorProjectNotFound(err error) bool

IsErrorProjectNotFound helper function to test for errProjectNotFound error.

func IsErrorVariableNotFound

func IsErrorVariableNotFound(err error) bool

IsErrorVariableNotFound helper function to test for errProjectNotFound error.

func IsHookUpToDate

func IsHookUpToDate(p *v1alpha1.HookParameters, g *gitlab.ProjectHook) bool

IsHookUpToDate checks whether there is a change in any of the modifiable fields.

func IsVariableUpToDate

func IsVariableUpToDate(p *v1alpha1.VariableParameters, g *gitlab.ProjectVariable) bool

IsVariableUpToDate checks whether there is a change in any of the modifiable fields.

func LateInitializeHook

func LateInitializeHook(in *v1alpha1.HookParameters, hook *gitlab.ProjectHook)

LateInitializeHook fills the empty fields in the hook spec with the values seen in gitlab.Hook.

func LateInitializeVariable

func LateInitializeVariable(in *v1alpha1.VariableParameters, variable *gitlab.ProjectVariable)

LateInitializeVariable fills the empty fields in the projecthook spec with the values seen in gitlab.Variable.

func VariableToParameters

func VariableToParameters(in gitlab.ProjectVariable) v1alpha1.VariableParameters

VariableToParameters coonverts a GitLab API representation of a Project Variable back into our local VariableParameters format

Types

type Client

type Client interface {
	GetProject(pid interface{}, opt *gitlab.GetProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)
	CreateProject(opt *gitlab.CreateProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)
	EditProject(pid interface{}, opt *gitlab.EditProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Project, *gitlab.Response, error)
	DeleteProject(pid interface{}, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

Client defines Gitlab Project service operations

func NewProjectClient

func NewProjectClient(cfg clients.Config) Client

NewProjectClient returns a new Gitlab Project service

type DeployTokenClient

type DeployTokenClient interface {
	ListProjectDeployTokens(pid interface{}, opt *gitlab.ListProjectDeployTokensOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.DeployToken, *gitlab.Response, error)
	CreateProjectDeployToken(pid interface{}, opt *gitlab.CreateProjectDeployTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.DeployToken, *gitlab.Response, error)
	DeleteProjectDeployToken(pid interface{}, deployToken int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

DeployTokenClient defines Gitlab Project service operations

func NewDeployTokenClient

func NewDeployTokenClient(cfg clients.Config) DeployTokenClient

NewDeployTokenClient returns a new Gitlab ProjectDeployToken service

type HookClient

type HookClient interface {
	GetProjectHook(pid interface{}, hook int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)
	AddProjectHook(pid interface{}, opt *gitlab.AddProjectHookOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)
	EditProjectHook(pid interface{}, hook int, opt *gitlab.EditProjectHookOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)
	DeleteProjectHook(pid interface{}, hook int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

HookClient defines Gitlab Hook service operations

func NewHookClient

func NewHookClient(cfg clients.Config) HookClient

NewHookClient returns a new Gitlab Project service

type MemberClient

type MemberClient interface {
	GetProjectMember(pid interface{}, user int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
	AddProjectMember(pid interface{}, opt *gitlab.AddProjectMemberOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
	EditProjectMember(pid interface{}, user int, opt *gitlab.EditProjectMemberOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
	DeleteProjectMember(pid interface{}, user int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

MemberClient defines Gitlab Member service operations

func NewMemberClient

func NewMemberClient(cfg clients.Config) MemberClient

NewMemberClient returns a new Gitlab Project Member service

type VariableClient

type VariableClient interface {
	GetVariable(pid interface{}, key string, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
	CreateVariable(pid interface{}, opt *gitlab.CreateProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
	UpdateVariable(pid interface{}, key string, opt *gitlab.UpdateProjectVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectVariable, *gitlab.Response, error)
	RemoveVariable(pid interface{}, key string, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

VariableClient defines Gitlab Variable service operations

func NewVariableClient

func NewVariableClient(cfg clients.Config) VariableClient

NewVariableClient returns a new Gitlab Project service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL