Documentation
¶
Index ¶
- func GenerateAddLicenseOptions(license string) *gitlab.AddLicenseOptions
- func GenerateAppearanceObservation(observed *gitlab.Appearance) v1alpha1.AppearanceObservation
- func GenerateApplicationSettingsObservation(g *gitlab.Settings) v1alpha1.ApplicationSettingsObservation
- func GenerateCreateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.CreateInstanceVariableOptions
- func GenerateLicenseObservation(observed *gitlab.License) v1alpha1.LicenseObservation
- func GenerateServiceAccountCreateOptions(p *v1alpha1.ServiceAccountParameters) *gitlab.CreateServiceAccountUserOptions
- func GenerateServiceAccountObservation(u *gitlab.User) v1alpha1.ServiceAccountObservation
- func GenerateUpdateAppearanceOptions(params *v1alpha1.AppearanceParameters) *gitlab.ChangeAppearanceOptions
- func GenerateUpdateApplicationSettingsOptions(p *v1alpha1.ApplicationSettingsParameters) *gitlab.UpdateSettingsOptions
- func GenerateUpdateServiceAccountOptions(p *v1alpha1.ServiceAccountParameters) *gitlab.ModifyUserOptions
- func GenerateUpdateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.UpdateInstanceVariableOptions
- func GenerateVariableObservation(variable *gitlab.InstanceVariable) v1alpha1.VariableObservation
- func IsAppearanceUpToDate(spec *v1alpha1.AppearanceParameters, observed *gitlab.Appearance) bool
- func IsApplicationSettingsUpToDate(p *v1alpha1.ApplicationSettingsParameters, g *gitlab.Settings) bool
- func IsLicenseUpToDate(spec *v1alpha1.LicenseParameters, observed *gitlab.License) bool
- func IsServiceAccountUpToDate(p *v1alpha1.ServiceAccountParameters, u *gitlab.User) bool
- func IsVariableUpToDate(p *v1alpha1.VariableParameters, g *gitlab.InstanceVariable) bool
- func LateInitializeVariable(in *v1alpha1.VariableParameters, variable *gitlab.InstanceVariable)
- type AppearanceClient
- type ApplicationSettingsClient
- type LicenseClient
- type ServiceAccountClient
- type VariableClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAddLicenseOptions ¶ added in v0.17.0
func GenerateAddLicenseOptions(license string) *gitlab.AddLicenseOptions
GenerateAddLicenseOptions from a license string
func GenerateAppearanceObservation ¶ added in v0.17.0
func GenerateAppearanceObservation(observed *gitlab.Appearance) v1alpha1.AppearanceObservation
GenerateAppearanceObservation generates an observation from a Gitlab Appearance
func GenerateApplicationSettingsObservation ¶
func GenerateApplicationSettingsObservation(g *gitlab.Settings) v1alpha1.ApplicationSettingsObservation
GenerateApplicationSettingsObservation generates GitLab Settings observation from the actual state This function is generated by ApplicationSettingsObservation and gitlab.Settings reflection
func GenerateCreateVariableOptions ¶ added in v0.17.0
func GenerateCreateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.CreateInstanceVariableOptions
GenerateCreateVariableOptions creates gitlab CreateInstanceVariableOptions from VariableParameters
func GenerateLicenseObservation ¶ added in v0.17.0
func GenerateLicenseObservation(observed *gitlab.License) v1alpha1.LicenseObservation
GenerateLicenseObservation creates LicenseObservation from Gitlab License
func GenerateServiceAccountCreateOptions ¶ added in v0.17.0
func GenerateServiceAccountCreateOptions(p *v1alpha1.ServiceAccountParameters) *gitlab.CreateServiceAccountUserOptions
GenerateServiceAccountCreateOptions is used to produce CreateServiceAccountUserOptions from ServiceAccountParameters
func GenerateServiceAccountObservation ¶ added in v0.17.0
func GenerateServiceAccountObservation(u *gitlab.User) v1alpha1.ServiceAccountObservation
GenerateServiceAccountObservation is used to produce ServiceAccountObservation from Gitlab User
func GenerateUpdateAppearanceOptions ¶ added in v0.17.0
func GenerateUpdateAppearanceOptions(params *v1alpha1.AppearanceParameters) *gitlab.ChangeAppearanceOptions
GenerateUpdateAppearanceOptions generates Gitlab ChangeAppearanceOptions from AppearanceParameters
func GenerateUpdateApplicationSettingsOptions ¶
func GenerateUpdateApplicationSettingsOptions(p *v1alpha1.ApplicationSettingsParameters) *gitlab.UpdateSettingsOptions
GenerateUpdateApplicationSettingsOptions generates GitLab Settings update options from the desired state This function is generated by ApplicationSettingsParameters and gitlab.UpdateSettingsOptions reflection
func GenerateUpdateServiceAccountOptions ¶ added in v0.17.0
func GenerateUpdateServiceAccountOptions(p *v1alpha1.ServiceAccountParameters) *gitlab.ModifyUserOptions
GenerateUpdateServiceAccountOptions is used to produce ModifyUserOptions from ServiceAccountParameters
func GenerateUpdateVariableOptions ¶ added in v0.17.0
func GenerateUpdateVariableOptions(p *v1alpha1.VariableParameters) *gitlab.UpdateInstanceVariableOptions
GenerateUpdateVariableOptions creates gitlab UpdateInstanceVariableOptions from VariableParameters
func GenerateVariableObservation ¶ added in v0.17.0
func GenerateVariableObservation(variable *gitlab.InstanceVariable) v1alpha1.VariableObservation
GenerateVariableObservation creates VariableObservation from gitlab InstanceVariable
func IsAppearanceUpToDate ¶ added in v0.17.0
func IsAppearanceUpToDate(spec *v1alpha1.AppearanceParameters, observed *gitlab.Appearance) bool
IsAppearanceUpToDate checks whether the Appearance parameters are up to date
func IsApplicationSettingsUpToDate ¶
func IsApplicationSettingsUpToDate(p *v1alpha1.ApplicationSettingsParameters, g *gitlab.Settings) bool
IsApplicationSettingsUpToDate checks whether the observed state matches the desired state This function is generated by ApplicationSettingsParameters and gitlab.Settings reflection
func IsLicenseUpToDate ¶ added in v0.17.0
func IsLicenseUpToDate(spec *v1alpha1.LicenseParameters, observed *gitlab.License) bool
IsLicenseUpToDate checks whether the License is up to date Since the GitLab API does not provide a way to get the current license details, We assume that the license is the one provided. This only checks if the license is expired or not.
func IsServiceAccountUpToDate ¶ added in v0.17.0
func IsServiceAccountUpToDate(p *v1alpha1.ServiceAccountParameters, u *gitlab.User) bool
IsServiceAccountUpToDate checks whether the ServiceAccountParameters is in sync with Gitlab User returns true if the parameters are nil or all fields are in sync
func IsVariableUpToDate ¶ added in v0.17.0
func IsVariableUpToDate(p *v1alpha1.VariableParameters, g *gitlab.InstanceVariable) bool
IsVariableUpToDate checks whether the VariableParameters is in sync with the external representation.
func LateInitializeVariable ¶ added in v0.17.0
func LateInitializeVariable(in *v1alpha1.VariableParameters, variable *gitlab.InstanceVariable)
LateInitializeVariable fills the empty fields in the variable spec with the values seen in gitlab.Variable.
Types ¶
type AppearanceClient ¶ added in v0.17.0
type AppearanceClient interface {
GetAppearance(options ...gitlab.RequestOptionFunc) (*gitlab.Appearance, *gitlab.Response, error)
ChangeAppearance(opt *gitlab.ChangeAppearanceOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Appearance, *gitlab.Response, error)
}
ApplicationSettingsClient defines Gitlab Application Settings service operations
func NewAppearanceClient ¶ added in v0.17.0
func NewAppearanceClient(cfg common.Config) AppearanceClient
NewAppearanceClient returns a new Gitlab Appearance service
type ApplicationSettingsClient ¶
type ApplicationSettingsClient interface {
GetSettings(options ...gitlab.RequestOptionFunc) (*gitlab.Settings, *gitlab.Response, error)
UpdateSettings(opt *gitlab.UpdateSettingsOptions, options ...gitlab.RequestOptionFunc) (*gitlab.Settings, *gitlab.Response, error)
}
ApplicationSettingsClient defines Gitlab Application Settings service operations
func NewApplicationSettingsClient ¶
func NewApplicationSettingsClient(cfg common.Config) ApplicationSettingsClient
NewApplicationSettingsClient returns a new Gitlab Application Settings service
type LicenseClient ¶ added in v0.17.0
type LicenseClient interface {
GetLicense(options ...gitlab.RequestOptionFunc) (*gitlab.License, *gitlab.Response, error)
AddLicense(opt *gitlab.AddLicenseOptions, options ...gitlab.RequestOptionFunc) (*gitlab.License, *gitlab.Response, error)
DeleteLicense(licenseID int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}
LicenseClient defines Gitlab License service operations
func NewLicenseClient ¶ added in v0.17.0
func NewLicenseClient(cfg common.Config) LicenseClient
NewLicenseClient returns a new Gitlab License service
type ServiceAccountClient ¶ added in v0.17.0
type ServiceAccountClient interface {
GetUser(user int64, opt gitlab.GetUsersOptions, options ...gitlab.RequestOptionFunc) (*gitlab.User, *gitlab.Response, error)
CreateServiceAccountUser(opts *gitlab.CreateServiceAccountUserOptions, options ...gitlab.RequestOptionFunc) (*gitlab.User, *gitlab.Response, error)
ModifyUser(user int64, opt *gitlab.ModifyUserOptions, options ...gitlab.RequestOptionFunc) (*gitlab.User, *gitlab.Response, error)
DeleteUser(user int64, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}
ServiceAccountClient defines Gitlab Service Account service operations
func NewServiceAccountClient ¶ added in v0.17.0
func NewServiceAccountClient(cfg common.Config) ServiceAccountClient
NewServiceAccountClient returns a new Gitlab Service Account service
type VariableClient ¶ added in v0.17.0
type VariableClient interface {
GetVariable(key string, options ...gitlab.RequestOptionFunc) (*gitlab.InstanceVariable, *gitlab.Response, error)
CreateVariable(opt *gitlab.CreateInstanceVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.InstanceVariable, *gitlab.Response, error)
UpdateVariable(key string, opt *gitlab.UpdateInstanceVariableOptions, options ...gitlab.RequestOptionFunc) (*gitlab.InstanceVariable, *gitlab.Response, error)
RemoveVariable(key string, options ...gitlab.RequestOptionFunc) (*gitlab.Response, error)
}
VariableClient defines Gitlab Variable service operations
func NewVariableClient ¶ added in v0.17.0
func NewVariableClient(cfg common.Config) VariableClient
NewVariableClient returns a new Gitlab Variable service