projects

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 10 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 GenerateCreateServiceAccountAccessTokenOptions added in v0.21.1

GenerateCreateServiceAccountAccessTokenOptions generates 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 GenerateIntegrationMattermostObservation added in v0.17.4

func GenerateIntegrationMattermostObservation(observation *gitlab.MattermostService) v1alpha1.IntegrationMattermostObservation

GenerateIntegrationMattermostObservation converts gitlab.MattermostService to IntegrationMattermostObservation.

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 GenerateProjectAccessTokenObservation added in v0.18.0

func GenerateProjectAccessTokenObservation(at *gitlab.ProjectAccessToken) v1alpha1.AccessTokenObservation

GenerateProjectAccessTokenObservation generates project access token observation from gitlab.ProjectAccessToken.

func GenerateProtectRepositoryBranchesOptions

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

GenerateProtectRepositoryBranchesOptions produces *gitlab.ProtectRepositoryBranchesOptions from ProtectedBranchParameters

func GenerateProtectRepositoryEnvironmentsOptions added in v0.17.5

func GenerateProtectRepositoryEnvironmentsOptions(p *v1alpha1.ProtectedEnvironmentParameters) *gitlab.ProtectRepositoryEnvironmentsOptions

GenerateProtectRepositoryEnvironmentsOptions produces *gitlab.ProtectRepositoryEnvironmentsOptions from spec.

func GenerateProtectedBranchObservation

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

GenerateProtectedBranchObservation produces a ProtectedBranchObservation from a gitlab.ProtectedBranch

func GenerateProtectedEnvironmentObservation added in v0.17.5

func GenerateProtectedEnvironmentObservation(pe *gitlab.ProtectedEnvironment) v1alpha1.ProtectedEnvironmentObservation

GenerateProtectedEnvironmentObservation builds status.atProvider from GitLab object.

func GenerateRemoveVariableOptions

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

GenerateRemoveVariableOptions generates project remove options.

func GenerateRotateProjectAccessTokenOptions added in v0.18.0

func GenerateRotateProjectAccessTokenOptions(p *v1alpha1.AccessTokenParameters) *gitlab.RotateProjectAccessTokenOptions

GenerateRotateProjectAccessTokenOptions generates project access token rotation options

func GenerateRotateSelfOptions added in v0.18.0

GenerateRotateSelfOptions generates self-rotation options from access token parameters.

func GenerateRotateServiceAccountAccessTokenOptions added in v0.21.1

GenerateRotateServiceAccountAccessTokenOptions generates owner-mode rotation options.

func GenerateRotateServiceAccountSelfOptions added in v0.21.1

func GenerateRotateServiceAccountSelfOptions(p *v1alpha1.ServiceAccountAccessTokenParameters) *gitlab.RotatePersonalAccessTokenOptions

GenerateRotateServiceAccountSelfOptions generates self-rotation options from parameters.

func GenerateServiceAccountAccessTokenObservation added in v0.21.1

func GenerateServiceAccountAccessTokenObservation(at *gitlab.PersonalAccessToken) v1alpha1.ServiceAccountAccessTokenObservation

GenerateServiceAccountAccessTokenObservation generates an observation from a gitlab.PersonalAccessToken.

func GenerateServiceAccountCreateOptions added in v0.21.1

func GenerateServiceAccountCreateOptions(p *v1alpha1.ServiceAccountParameters) *gitlab.CreateProjectServiceAccountOptions

GenerateServiceAccountCreateOptions produces CreateProjectServiceAccountOptions from ServiceAccountParameters.

func GenerateServiceAccountObservation added in v0.21.1

func GenerateServiceAccountObservation(a *gitlab.ProjectServiceAccount) v1alpha1.ServiceAccountObservation

GenerateServiceAccountObservation is used to produce ServiceAccountObservation from a gitlab.ProjectServiceAccount.

func GenerateSetMattermostServiceOptions added in v0.17.4

func GenerateSetMattermostServiceOptions(in *v1alpha1.IntegrationMattermostParameters) *gitlab.SetMattermostServiceOptions

GenerateSetMattermostServiceOptions produces SetMattermostServiceOptions from IntegrationMattermostParameters.

func GenerateUpdateApprovalRulesOptions

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

GenerateUpdateApprovalRulesOptions generates project member edit options

func GenerateUpdateProtectedEnvironmentsOptions added in v0.17.5

GenerateUpdateProtectedEnvironmentsOptions builds the delta; returns nil if there are no changes.

func GenerateUpdateServiceAccountOptions added in v0.21.1

func GenerateUpdateServiceAccountOptions(p *v1alpha1.ServiceAccountParameters) *gitlab.UpdateProjectServiceAccountOptions

GenerateUpdateServiceAccountOptions produces UpdateProjectServiceAccountOptions from ServiceAccountParameters.

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 GetProjectServiceAccount added in v0.21.1

func GetProjectServiceAccount(c ServiceAccountClient, pid any, serviceAccountID int64, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectServiceAccount, *gitlab.Response, error)

GetProjectServiceAccount paginates a project's service accounts and returns the one matching serviceAccountID. There is no get-by-id endpoint, so a missing service account returns a nil result and the last response for not-found detection.

func GetServiceAccountAccessToken added in v0.21.1

func GetServiceAccountAccessToken(c ServiceAccountAccessTokenClient, pid any, serviceAccount, tokenID int64, options ...gitlab.RequestOptionFunc) (*gitlab.PersonalAccessToken, *gitlab.Response, error)

GetServiceAccountAccessToken paginates over a service account's personal access tokens and returns the one matching tokenID. When no token matches it returns a nil token and the last response so callers can detect not-found.

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 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 IsErrorProtectedEnvironmentNotFound added in v0.17.5

func IsErrorProtectedEnvironmentNotFound(err error) bool

IsErrorProtectedEnvironmentNotFound helper function to test for errProtectedEnvironmentNotFound 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 IsIntegrationMattermostUpToDate added in v0.17.4

func IsIntegrationMattermostUpToDate(spec *v1alpha1.IntegrationMattermostParameters, observation *gitlab.MattermostService) bool

IsIntegrationMattermostUpToDate returns true if spec matches the observed GitLab Mattermost service.

Note: WebHook is intentionally excluded from comparison because GitLab does not return it (write-only).

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 IsProtectedEnvironmentUpToDate added in v0.17.5

func IsProtectedEnvironmentUpToDate(p *v1alpha1.ProtectedEnvironmentParameters, pe *gitlab.ProtectedEnvironment) bool

IsProtectedEnvironmentUpToDate checks whether desired spec equals GitLab state.

func IsServiceAccountUpToDate added in v0.21.1

func IsServiceAccountUpToDate(p *v1alpha1.ServiceAccountParameters, a *gitlab.ProjectServiceAccount) bool

IsServiceAccountUpToDate checks whether the ServiceAccountParameters is in sync with the observed gitlab.ProjectServiceAccount.

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 LateInitializeIntegrationMattermost added in v0.17.4

func LateInitializeIntegrationMattermost(in *v1alpha1.IntegrationMattermostParameters, svc *gitlab.MattermostService)

LateInitializeIntegrationMattermost fills nil spec fields using values from the remote Mattermost service. It mutates the spec in place and does NOT touch write-only fields like WebHook.

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 LateInitializeProtectedEnvironment added in v0.17.5

func LateInitializeProtectedEnvironment(in *v1alpha1.ProtectedEnvironmentParameters, pe *gitlab.ProtectedEnvironment)

LateInitializeProtectedEnvironment fills empty fields in spec with values from GitLab.

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.

func ShouldRotateAccessToken added in v0.18.0

func ShouldRotateAccessToken(p *v1alpha1.AccessTokenParameters, a *gitlab.ProjectAccessToken) bool

ShouldRotateAccessToken returns true when the token must be rotated.

func ShouldRotateServiceAccountAccessToken added in v0.21.1

func ShouldRotateServiceAccountAccessToken(p *v1alpha1.ServiceAccountAccessTokenParameters, a *gitlab.PersonalAccessToken) bool

ShouldRotateServiceAccountAccessToken returns true when the token must be rotated.

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)
	RotateProjectAccessToken(pid interface{}, id int64, opt *gitlab.RotateProjectAccessTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectAccessToken, *gitlab.Response, error)
	RotateSelf(opt *gitlab.RotatePersonalAccessTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PersonalAccessToken, *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)

	ShareProjectWithGroup(pid any, opt *gitlab.ShareWithGroupOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	DeleteSharedProjectFromGroup(pid any, groupID int64, options ...gitlab.RequestOptionFunc) (*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 MattermostClient added in v0.17.4

type MattermostClient interface {
	GetMattermostService(pid any, options ...gitlab.RequestOptionFunc) (*gitlab.MattermostService, *gitlab.Response, error)
	SetMattermostService(pid any, opt *gitlab.SetMattermostServiceOptions, options ...gitlab.RequestOptionFunc) (*gitlab.MattermostService, *gitlab.Response, error)
	DeleteMattermostService(pid any, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

MattermostClient defines GitLab Mattermost integration operations.

func NewMattermostClient added in v0.17.4

func NewMattermostClient(cfg common.Config) MattermostClient

NewMattermostClient returns a new GitLab Services client.

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 ProtectedEnvironmentClient added in v0.17.5

type ProtectedEnvironmentClient interface {
	GetProtectedEnvironment(pid interface{}, name string, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedEnvironment, *gitlab.Response, error)
	ProtectRepositoryEnvironments(pid interface{}, opt *gitlab.ProtectRepositoryEnvironmentsOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedEnvironment, *gitlab.Response, error)
	UpdateProtectedEnvironments(pid interface{}, name string, opt *gitlab.UpdateProtectedEnvironmentsOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProtectedEnvironment, *gitlab.Response, error)
	UnprotectEnvironment(pid interface{}, name string, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

ProtectedEnvironmentClient defines GitLab Protected Environments service operations.

func NewProtectedEnvironmentClient added in v0.17.5

func NewProtectedEnvironmentClient(cfg common.Config) ProtectedEnvironmentClient

NewProtectedEnvironmentClient returns a new GitLab Protected Environments client.

type ServiceAccountAccessTokenClient added in v0.21.1

type ServiceAccountAccessTokenClient interface {
	// Owner-authenticated endpoints (the ProviderConfig is a project owner/maintainer).
	ListProjectServiceAccountPersonalAccessTokens(pid any, serviceAccount int64, opt *gitlab.ListProjectServiceAccountPersonalAccessTokensOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.PersonalAccessToken, *gitlab.Response, error)
	CreateProjectServiceAccountPersonalAccessToken(pid any, serviceAccount int64, opt *gitlab.CreateProjectServiceAccountPersonalAccessTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PersonalAccessToken, *gitlab.Response, error)
	RevokeProjectServiceAccountPersonalAccessToken(pid any, serviceAccount, token int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
	RotateProjectServiceAccountPersonalAccessToken(pid any, serviceAccount, token int64, opt *gitlab.RotateProjectServiceAccountPersonalAccessTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PersonalAccessToken, *gitlab.Response, error)

	// Self-authenticated endpoints (the ProviderConfig authenticates with the
	// very token this resource manages). Used in self-managed mode.
	GetServiceAccountSelf(options ...gitlab.RequestOptionFunc) (*gitlab.PersonalAccessToken, *gitlab.Response, error)
	RotateServiceAccountSelf(opt *gitlab.RotatePersonalAccessTokenOptions, options ...gitlab.RequestOptionFunc) (*gitlab.PersonalAccessToken, *gitlab.Response, error)
	RevokeServiceAccountSelf(options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

ServiceAccountAccessTokenClient defines GitLab project service account personal access token operations.

func NewServiceAccountAccessTokenClient added in v0.21.1

func NewServiceAccountAccessTokenClient(cfg common.Config) ServiceAccountAccessTokenClient

NewServiceAccountAccessTokenClient returns a new GitLab project service account access token service.

type ServiceAccountClient added in v0.21.1

type ServiceAccountClient interface {
	ListProjectServiceAccounts(pid any, opt *gitlab.ListProjectServiceAccountsOptions, options ...gitlab.RequestOptionFunc) ([]*gitlab.ProjectServiceAccount, *gitlab.Response, error)
	CreateProjectServiceAccount(pid any, opt *gitlab.CreateProjectServiceAccountOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectServiceAccount, *gitlab.Response, error)
	UpdateProjectServiceAccount(pid any, serviceAccount int64, opt *gitlab.UpdateProjectServiceAccountOptions, options ...gitlab.RequestOptionFunc) (*gitlab.ProjectServiceAccount, *gitlab.Response, error)
	DeleteProjectServiceAccount(pid any, serviceAccount int64, opt *gitlab.DeleteProjectServiceAccountOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}

ServiceAccountClient defines Gitlab project service account service operations.

func NewServiceAccountClient added in v0.21.1

func NewServiceAccountClient(cfg common.Config) ServiceAccountClient

NewServiceAccountClient returns a new Gitlab project service account service.

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