Documentation
      ¶
    
    
  
    
  
    Index ¶
- func GenerateAddMemberOptions(p *v1alpha1.MemberParameters) *gitlab.AddProjectMemberOptions
 - func GenerateCreateHookOptions(p *v1alpha1.HookParameters, client client.Client, ctx context.Context) (*gitlab.AddProjectHookOptions, error)
 - func GenerateCreateProjectAccessTokenOptions(name string, p *v1alpha1.AccessTokenParameters) *gitlab.CreateProjectAccessTokenOptions
 - func GenerateCreateProjectDeployTokenOptions(name string, p *v1alpha1.DeployTokenParameters) *gitlab.CreateProjectDeployTokenOptions
 - func GenerateCreateProjectOptions(name string, p *v1alpha1.ProjectParameters) *gitlab.CreateProjectOptions
 - func GenerateCreateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.CreateProjectVariableOptions
 - func GenerateEditHookOptions(p *v1alpha1.HookParameters, client client.Client, ctx context.Context) (*gitlab.EditProjectHookOptions, error)
 - func GenerateEditMemberOptions(p *v1alpha1.MemberParameters) *gitlab.EditProjectMemberOptions
 - func GenerateEditProjectOptions(name string, p *v1alpha1.ProjectParameters) *gitlab.EditProjectOptions
 - func GenerateGetVariableOptions(p *v1alpha1.VariableParameters) *gitlab.GetProjectVariableOptions
 - func GenerateHookObservation(hook *gitlab.ProjectHook) v1alpha1.HookObservation
 - func GenerateMemberObservation(projectMember *gitlab.ProjectMember) v1alpha1.MemberObservation
 - func GenerateObservation(prj *gitlab.Project) v1alpha1.ProjectObservation
 - func GenerateOwnerObservation(usr *gitlab.User) *v1alpha1.User
 - func GenerateRemoveVariableOptions(p *v1alpha1.VariableParameters) *gitlab.RemoveProjectVariableOptions
 - func GenerateUpdateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.UpdateProjectVariableOptions
 - func GenerateVariableFilter(p *v1alpha1.VariableParameters) *gitlab.VariableFilter
 - func IsErrorHookNotFound(err error) bool
 - func IsErrorMemberNotFound(err error) bool
 - func IsErrorProjectAccessTokenNotFound(err error) bool
 - func IsErrorProjectDeployTokenNotFound(err error) bool
 - func IsErrorProjectNotFound(err error) bool
 - func IsErrorVariableNotFound(err error) bool
 - func IsHookUpToDate(p *v1alpha1.HookParameters, g *gitlab.ProjectHook) bool
 - func IsVariableUpToDate(p *v1alpha1.VariableParameters, g *gitlab.ProjectVariable) bool
 - func LateInitializeHook(in *v1alpha1.HookParameters, hook *gitlab.ProjectHook)
 - func LateInitializeVariable(in *v1alpha1.VariableParameters, variable *gitlab.ProjectVariable)
 - func VariableToParameters(in gitlab.ProjectVariable) v1alpha1.VariableParameters
 - type AccessTokenClient
 - type Client
 - type DeployKeyClient
 - type DeployTokenClient
 - type HookClient
 - type MemberClient
 - type PipelineScheduleClient
 - type VariableClient
 
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, client client.Client, ctx context.Context) (*gitlab.AddProjectHookOptions, error)
GenerateCreateHookOptions generates project creation options
func GenerateCreateProjectAccessTokenOptions ¶ added in v0.4.0
func GenerateCreateProjectAccessTokenOptions(name string, p *v1alpha1.AccessTokenParameters) *gitlab.CreateProjectAccessTokenOptions
GenerateCreateProjectAccessTokenOptions 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, client client.Client, ctx context.Context) (*gitlab.EditProjectHookOptions, error)
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 GenerateGetVariableOptions ¶ added in v0.4.0
func GenerateGetVariableOptions(p *v1alpha1.VariableParameters) *gitlab.GetProjectVariableOptions
GenerateGetVariableOptions generates project get 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 GenerateOwnerObservation ¶ added in v0.4.0
GenerateOwnerObservation generates v1alpha.User from gitlab.User.
func GenerateRemoveVariableOptions ¶ added in v0.4.0
func GenerateRemoveVariableOptions(p *v1alpha1.VariableParameters) *gitlab.RemoveProjectVariableOptions
GenerateRemoveVariableOptions generates project remove options.
func GenerateUpdateVariableOptions ¶
func GenerateUpdateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.UpdateProjectVariableOptions
GenerateUpdateVariableOptions generates project update options
func GenerateVariableFilter ¶ added in v0.4.0
func GenerateVariableFilter(p *v1alpha1.VariableParameters) *gitlab.VariableFilter
GenerateVariableFilter generates a variable filter that matches the variable parameters' environment scope.
func IsErrorHookNotFound ¶
IsErrorHookNotFound helper function to test for errProjectNotFound error.
func IsErrorMemberNotFound ¶
IsErrorMemberNotFound helper function to test for errMemberNotFound error.
func IsErrorProjectAccessTokenNotFound ¶ added in v0.4.0
IsErrorProjectAccessTokenNotFound helper function to test for errProjectAccessTokenNotFound error.
func IsErrorProjectDeployTokenNotFound ¶
IsErrorProjectDeployTokenNotFound helper function to test for errProjectDeployTokenNotFound error.
func IsErrorProjectNotFound ¶
IsErrorProjectNotFound helper function to test for errProjectNotFound error.
func IsErrorVariableNotFound ¶
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 AccessTokenClient ¶ added in v0.4.0
type AccessTokenClient interface {
	GetProjectAccessToken(pid interface{}, id int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectAccessToken, *gitlab.Response, error)
	CreateProjectAccessToken(pid interface{}, opt *gitlab.CreateProjectAccessTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectAccessToken, *gitlab.Response, error)
	RevokeProjectAccessToken(pid interface{}, id int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}
    AccessTokenClient defines Gitlab Project service operations
func NewAccessTokenClient ¶ added in v0.4.0
func NewAccessTokenClient(cfg clients.Config) AccessTokenClient
NewAccessTokenClient returns a new Gitlab ProjectAccessToken service
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 ¶
NewProjectClient returns a new Gitlab Project service
type DeployKeyClient ¶ added in v0.4.0
type DeployKeyClient interface {
	AddDeployKey(pid interface{}, opt *gitlab.AddDeployKeyOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)
	DeleteDeployKey(pid interface{}, deployKey int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	UpdateDeployKey(pid interface{}, deployKey int, opt *gitlab.UpdateDeployKeyOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)
	GetDeployKey(pid interface{}, deployKey int, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)
}
    DeployKeyClient is an interface for gitlab DeployKeyClient
type DeployTokenClient ¶
type DeployTokenClient interface {
	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)
	GetProjectDeployToken(pid interface{}, deployToken int, options ...gitlab.RequestOptionFunc) (*gitlab.DeployToken, *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 PipelineScheduleClient ¶ added in v0.4.0
type PipelineScheduleClient interface {
	GetPipelineSchedule(pid interface{}, schedule int, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)
	CreatePipelineSchedule(pid interface{}, opt *gitlab.CreatePipelineScheduleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)
	EditPipelineSchedule(pid interface{}, schedule int, opt *gitlab.EditPipelineScheduleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)
	DeletePipelineSchedule(pid interface{}, schedule int, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	CreatePipelineScheduleVariable(pid interface{}, schedule int, opt *gitlab.CreatePipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
	DeletePipelineScheduleVariable(pid interface{}, schedule int, key string, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
	EditPipelineScheduleVariable(pid interface{}, schedule int, key string, opt *gitlab.EditPipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
}
    PipelineScheduleClient is an interface for Gitlab PipelineScheduleService.
type VariableClient ¶
type VariableClient interface {
	ListVariables(pid interface{}, opt *gitlab.ListProjectVariablesOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.ProjectVariable, *gitlab.Response, error)
	GetVariable(pid interface{}, key string, opt *gitlab.GetProjectVariableOptions, 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, opt *gitlab.RemoveProjectVariableOptions, 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