projects

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 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 GenerateAddProjectBadgeOptions added in v0.17.0

func GenerateAddProjectBadgeOptions(p *v1alpha1.BadgeParameters) *gitlab.AddProjectBadgeOptions

GenerateAddProjectBadgeOptions generates project creation options from v1alpha1 parameters

func GenerateAddPushRulesOptions added in v0.17.1

func GenerateAddPushRulesOptions(p *v1alpha1.ProjectParameters) *gitlab.AddProjectPushRuleOptions

func GenerateBadgeObservation added in v0.17.0

func GenerateBadgeObservation(b *gitlab.ProjectBadge) v1alpha1.BadgeObservation

GenerateBadgeObservation generates v1alpha1 observation from Gitlab ProjectBadge

func GenerateCreateApprovalRulesOptions

func GenerateCreateApprovalRulesOptions(p *v1alpha1.ApprovalRuleParameters) *gitlab.CreateProjectLevelRuleOptions

GenerateCreateApprovalRulesOptions generates project member add options

func GenerateCreateHookOptions

func GenerateCreateHookOptions(p *v1alpha1.HookParameters, token *string) *gitlab.AddProjectHookOptions

GenerateCreateHookOptions generates project creation options

func GenerateCreateProjectAccessTokenOptions

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, token *string) *gitlab.EditProjectHookOptions

GenerateEditHookOptions generates project edit options

func GenerateEditMemberOptions

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

GenerateEditMemberOptions generates project member edit options

func GenerateEditProjectBadgeOptions added in v0.17.0

func GenerateEditProjectBadgeOptions(p *v1alpha1.BadgeParameters) *gitlab.EditProjectBadgeOptions

GenerateEditProjectBadgeOptions generates project edit options from v1alpha1 parameters

func GenerateEditProjectOptions

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

GenerateEditProjectOptions generates project edit options

func GenerateGetVariableOptions

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

func GenerateOwnerObservation(usr *gitlab.User) *v1alpha1.User

GenerateOwnerObservation generates v1alpha.User from gitlab.User.

func GenerateProtectRepositoryBranchesOptions

func GenerateProtectRepositoryBranchesOptions(name string, p *v1alpha1.ProtectedBranchParameters) *gitlab.ProtectRepositoryBranchesOptions

GenerateProtectRepositoryBranchesOptions produces *gitlab.ProtectRepositoryBranchesOptions from ProtectedBranchParameters

func GenerateProtectedBranchObservation

func GenerateProtectedBranchObservation(pb *gitlab.ProtectedBranch) v1alpha1.ProtectedBranchObservation

GenerateProtectedBranchObservation produces a ProtectedBranchObservation from a gitlab.ProtectedBranch

func GenerateRemoveVariableOptions

func GenerateRemoveVariableOptions(p *v1alpha1.VariableParameters) *gitlab.RemoveProjectVariableOptions

GenerateRemoveVariableOptions generates project remove options.

func GenerateUpdateApprovalRulesOptions

func GenerateUpdateApprovalRulesOptions(p *v1alpha1.ApprovalRuleParameters) *gitlab.UpdateProjectLevelRuleOptions

GenerateUpdateApprovalRulesOptions generates project member edit options

func GenerateUpdateVariableOptions

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

GenerateUpdateVariableOptions generates project update options

func GenerateVariableFilter

func GenerateVariableFilter(p *v1alpha1.VariableParameters) *gitlab.VariableFilter

GenerateVariableFilter generates a variable filter that matches the variable parameters' environment scope.

func GenerateVariableObservation added in v0.17.0

func GenerateVariableObservation(variable *gitlab.ProjectVariable) v1alpha1.VariableObservation

GenerateVariableObservation creates VariableObservation from gitlab InstanceVariable

func IsApprovalRuleUpToDate

func IsApprovalRuleUpToDate(p *v1alpha1.ApprovalRuleParameters, g *gitlab.ProjectApprovalRule) bool

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

func IsBadgeUpToDate added in v0.17.0

func IsBadgeUpToDate(spec *v1alpha1.BadgeParameters, observed *gitlab.ProjectBadge) bool

IsBadgeUpToDate checks whether the observed Gitlab ProjectBadge is up to date compared to the desired v1alpha1 parameters

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 IsErrorProjectAccessTokenNotFound

func IsErrorProjectAccessTokenNotFound(err error) bool

IsErrorProjectAccessTokenNotFound helper function to test for errProjectAccessTokenNotFound error.

func IsErrorProjectBadgeNotFound added in v0.17.0

func IsErrorProjectBadgeNotFound(err error) bool

IsErrorProjectBadgeNotFound helper function to test for errProjectBadgeNotFound 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 IsErrorProtectedBranchNotFound

func IsErrorProtectedBranchNotFound(err error) bool

IsErrorProtectedBranchNotFound helper function to test for errProtectedBranchNotFound 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 IsProtectedBranchUpToDate

func IsProtectedBranchUpToDate(p *v1alpha1.ProtectedBranchParameters, pb *gitlab.ProtectedBranch) bool

IsProtectedBranchUpToDate 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 LateInitializeProtectedBranch

func LateInitializeProtectedBranch(in *v1alpha1.ProtectedBranchParameters, pb *gitlab.ProtectedBranch)

LateInitializeProtectedBranch fills the empty fields in the protected branch spec with the values seen in gitlab.ProtectedBranch.

func LateInitializeVariable

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

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

Types

type AccessTokenClient

type AccessTokenClient interface {
	GetProjectAccessToken(pid interface{}, id int64, 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 int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

AccessTokenClient defines Gitlab Project service operations

func NewAccessTokenClient

func NewAccessTokenClient(cfg common.Config) AccessTokenClient

NewAccessTokenClient returns a new Gitlab ProjectAccessToken service

type ApprovalRulesClient

type ApprovalRulesClient interface {
	GetProjectApprovalRule(pid any, ruleID int64, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)
	CreateProjectApprovalRule(pid any, opt *gitlab.CreateProjectLevelRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)
	UpdateProjectApprovalRule(pid any, approvalRule int64, opt *gitlab.UpdateProjectLevelRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectApprovalRule, *gitlab.Response, error)
	DeleteProjectApprovalRule(pid any, approvalRule int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

ApprovalRulesClient Gitlab Member service operations

func NewApprovalRulesClient

func NewApprovalRulesClient(cfg common.Config) ApprovalRulesClient

NewApprovalRulesClient returns a new Gitlab Project Member service

type BadgeClient added in v0.17.0

type BadgeClient interface {
	ListProjectBadges(gid any, opt *gitlab.ListProjectBadgesOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.ProjectBadge, *gitlab.Response, error)
	GetProjectBadge(gid any, badge int64, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectBadge, *gitlab.Response, error)
	AddProjectBadge(gid any, opt *gitlab.AddProjectBadgeOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectBadge, *gitlab.Response, error)
	EditProjectBadge(gid any, badge int64, opt *gitlab.EditProjectBadgeOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectBadge, *gitlab.Response, error)
	DeleteProjectBadge(gid any, badge int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	PreviewProjectBadge(gid any, opt *gitlab.ProjectBadgePreviewOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectBadge, *gitlab.Response, error)
}

ProjectBadgeClient defines Gitlab Project service operations

func NewBadgeClient added in v0.17.0

func NewBadgeClient(cfg common.Config) BadgeClient

NewBadgeClient returns a new Gitlab ProjectBadge 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{}, opt *gitlab.DeleteProjectOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

	GetProjectPushRules(pid interface{}, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectPushRules, *gitlab.Response, error)
	AddProjectPushRule(pid interface{}, opt *gitlab.AddProjectPushRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectPushRules, *gitlab.Response, error)
	EditProjectPushRule(pid interface{}, opt *gitlab.EditProjectPushRuleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectPushRules, *gitlab.Response, error)
}

Client defines Gitlab Project service operations

func NewProjectClient

func NewProjectClient(cfg common.Config) Client

NewProjectClient returns a new Gitlab Project service

type DeployKeyClient

type DeployKeyClient interface {
	AddDeployKey(pid interface{}, opt *gitlab.AddDeployKeyOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)
	DeleteDeployKey(pid interface{}, deployKey int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	UpdateDeployKey(pid interface{}, deployKey int64, opt *gitlab.UpdateDeployKeyOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectDeployKey, *gitlab.Response, error)
	GetDeployKey(pid interface{}, deployKey int64, 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 int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	GetProjectDeployToken(pid interface{}, deployToken int64, options ...gitlab.RequestOptionFunc) (*gitlab.DeployToken, *gitlab.Response, error)
}

DeployTokenClient defines Gitlab Project service operations

func NewDeployTokenClient

func NewDeployTokenClient(cfg common.Config) DeployTokenClient

NewDeployTokenClient returns a new Gitlab ProjectDeployToken service

type HookClient

type HookClient interface {
	GetProjectHook(pid interface{}, hook int64, 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 int64, opt *gitlab.EditProjectHookOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectHook, *gitlab.Response, error)
	DeleteProjectHook(pid interface{}, hook int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

HookClient defines Gitlab Hook service operations

func NewHookClient

func NewHookClient(cfg common.Config) HookClient

NewHookClient returns a new Gitlab Project service

type MemberClient

type MemberClient interface {
	GetProjectMember(pid interface{}, user int64, 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 int64, opt *gitlab.EditProjectMemberOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectMember, *gitlab.Response, error)
	DeleteProjectMember(pid interface{}, user int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

MemberClient defines Gitlab Member service operations

func NewMemberClient

func NewMemberClient(cfg common.Config) MemberClient

NewMemberClient returns a new Gitlab Project Member service

type PipelineScheduleClient

type PipelineScheduleClient interface {
	GetPipelineSchedule(pid interface{}, schedule int64, 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 int64, opt *gitlab.EditPipelineScheduleOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineSchedule, *gitlab.Response, error)
	DeletePipelineSchedule(pid interface{}, schedule int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)

	CreatePipelineScheduleVariable(pid interface{}, schedule int64, opt *gitlab.CreatePipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
	DeletePipelineScheduleVariable(pid interface{}, schedule int64, key string, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
	EditPipelineScheduleVariable(pid interface{}, schedule int64, key string, opt *gitlab.EditPipelineScheduleVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PipelineVariable, *gitlab.Response, error)
}

PipelineScheduleClient is an interface for Gitlab PipelineScheduleService.

type ProtectedBranchClient

type ProtectedBranchClient interface {
	GetProtectedBranch(pid interface{}, branch string, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)
	ProtectRepositoryBranches(pid interface{}, opt *gitlab.ProtectRepositoryBranchesOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedBranch, *gitlab.Response, error)
	UnprotectRepositoryBranches(pid interface{}, branch string, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

ProtectedBranchClient defines GitLab Protected Branch service operations

func NewProtectedBranchClient

func NewProtectedBranchClient(cfg common.Config) ProtectedBranchClient

NewProtectedBranchClient returns a new GitLab Protected Branch client

type VariableClient

VariableClient defines Gitlab Variable service operations

func NewVariableClient

func NewVariableClient(cfg common.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