clients

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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessControlValueStringToGitlab

func AccessControlValueStringToGitlab(from string) *gitlab.AccessControlValue

AccessControlValueStringToGitlab converts string to *gitlab.AccessControlValue

func AccessControlValueV1alpha1ToGitlab

func AccessControlValueV1alpha1ToGitlab(from *v1alpha1.AccessControlValue) *gitlab.AccessControlValue

AccessControlValueV1alpha1ToGitlab converts *v1alpha1.AccessControlValue to *gitlab.AccessControlValue

func AreStringSlicesEqual added in v0.21.1

func AreStringSlicesEqual(a, b []string) bool

AreStringSlicesEqual compares two slices of comparable types for equality This equality is order insensitive, meaning that the order of elements in the slices does not matter for them to be considered equal.

func ContainerExpirationPolicyAttributesV1alpha1ToGitlab

func ContainerExpirationPolicyAttributesV1alpha1ToGitlab(from *v1alpha1.ContainerExpirationPolicyAttributes) *gitlab.ContainerExpirationPolicyAttributes

ContainerExpirationPolicyAttributesV1alpha1ToGitlab converts *v1alpha1.ContainerExpirationPolicyAttributes to *gitlab.ContainerExpirationPolicyAttributes

func IsBoolEqualToBoolPtr

func IsBoolEqualToBoolPtr(bp *bool, b bool) bool

IsBoolEqualToBoolPtr compares a *bool with bool

func IsComparableEqualToComparablePtr

func IsComparableEqualToComparablePtr[T comparable](cp *T, c T) bool

IsComparableEqualToComparablePtr compares a *T with T where T is comparable Returns true if cp is nil or *cp is equal to c, otherwise returns false

func IsComparablePtrEqualToComparablePtr

func IsComparablePtrEqualToComparablePtr[T comparable](p *T, g *T) bool

IsComparablePtrEqualToComparablePtr compares a *T with *T where T is comparable

func IsComparableSliceEqualToComparableSlicePtr

func IsComparableSliceEqualToComparableSlicePtr[T comparable](csp *[]T, cs []T) bool

IsComparableSliceEqualToComparableSlicePtr compares a *[]T with []T where T is comparable

func IsInt64EqualToInt64Ptr added in v0.17.0

func IsInt64EqualToInt64Ptr(ip *int64, i int64) bool

IsInt64EqualToInt64Ptr compares an *int64 with int64

func IsIntEqualToIntPtr

func IsIntEqualToIntPtr(ip *int, i int) bool

IsIntEqualToIntPtr compares an *int with int (deprecated, use IsInt64EqualToInt64Ptr) Kept for backwards compatibility with old code

func IsMapStringToComparableEqualToMapStringToComparablePtr

func IsMapStringToComparableEqualToMapStringToComparablePtr[T comparable](mp *map[string]T, m map[string]T) bool

IsMapStringToComparableEqualToMapStringToComparablePtr compares a *map[string]T with map[string]T where T is comparable

func IsResponseNotFound

func IsResponseNotFound(res *gitlab.Response) bool

IsResponseNotFound returns true of Gitlab Response indicates CR was not found

func IsResponseUnauthorized added in v0.21.1

func IsResponseUnauthorized(res *gitlab.Response) bool

IsResponseUnauthorized reports whether the GitLab response indicates the credential itself was rejected: 401 Unauthorized or 403 Forbidden. GitLab returns 401 when a token is revoked or expired, and escalates repeated unauthorized requests from the same IP to 403. Both mean the token can no longer authenticate (as opposed to a missing resource or transient failure).

func IsStringEqualToStringPtr

func IsStringEqualToStringPtr(sp *string, s string) bool

IsStringEqualToStringPtr compares a *string with string

func IsTimePtrEqualToTimePtr

func IsTimePtrEqualToTimePtr(tp1, tp2 *time.Time) bool

IsTimePtrEqualToTimePtr compares a *time.Time with *time.Time

func LateInitialize

func LateInitialize[T any](in, from *T) *T

LateInitialize return in if not nil or from.

func LateInitializeAccessControlValue

func LateInitializeAccessControlValue(in *v1alpha1.AccessControlValue, from gitlab.AccessControlValue) *v1alpha1.AccessControlValue

LateInitializeAccessControlValue returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.

func LateInitializeFromValue

func LateInitializeFromValue[T any](in *T, from T) *T

LateInitializeFromValue returns in if not nil or a pointer to from.

func LateInitializeFromValueIfNotZero

func LateInitializeFromValueIfNotZero[T comparable](in *T, from T) *T

LateInitializeFromValue returns from if in is nil and from is not the zero value of T. Otherwise it returns in.

func LateInitializeMergeMethodValue

func LateInitializeMergeMethodValue(in *v1alpha1.MergeMethodValue, from gitlab.MergeMethodValue) *v1alpha1.MergeMethodValue

LateInitializeMergeMethodValue returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.

func LateInitializeStringPtr

func LateInitializeStringPtr(in *string, from string) *string

LateInitializeStringPtr returns `from` if `in` is nil and `from` is non-empty, in other cases it returns `in`.

func LateInitializeVisibilityValue

func LateInitializeVisibilityValue(in *v1alpha1.VisibilityValue, from gitlab.VisibilityValue) *v1alpha1.VisibilityValue

LateInitializeVisibilityValue returns in if it's non-nil, otherwise returns from which is the backup for the cases in is nil.

func MergeMethodStringToGitlab

func MergeMethodStringToGitlab(from string) *gitlab.MergeMethodValue

MergeMethodStringToGitlab converts string to *gitlab.MergeMethodValue

func MergeMethodV1alpha1ToGitlab

func MergeMethodV1alpha1ToGitlab(from *v1alpha1.MergeMethodValue) *gitlab.MergeMethodValue

MergeMethodV1alpha1ToGitlab converts *v1alpha1.MergeMethodValue to *gitlab.MergeMethodValue

func StringPtrSliceToVisibilityValuePtrSlice

func StringPtrSliceToVisibilityValuePtrSlice(s *[]string) *[]gitlab.VisibilityValue

StringPtrSliceToVisibilityValuePtrSlice converts *[]string to *[]gitlab.VisibilityValue

func StringToPtr

func StringToPtr(s string) *string

StringToPtr converts string to *string

func TokenHash added in v0.21.1

func TokenHash(token *string) string

TokenHash returns a stable hex-encoded SHA-256 digest of the supplied token value, or an empty string when no token is set. GitLab never returns webhook secret tokens, so the digest is stored in status.atProvider to detect when a referenced secret has been rotated on the desired side and must be re-pushed. Only the digest is ever persisted, never the raw token.

func VisibilityValueSliceToStringSlice

func VisibilityValueSliceToStringSlice(from []gitlab.VisibilityValue) []string

VisibilityValueSliceToStringSlice converts []gitlab.VisibilityValue to []string

func VisibilityValueStringToGitlab

func VisibilityValueStringToGitlab(from string) *gitlab.VisibilityValue

VisibilityValueStringToGitlab converts string to *gitlab.VisibilityValue

func VisibilityValueV1alpha1ToGitlab

func VisibilityValueV1alpha1ToGitlab(from *v1alpha1.VisibilityValue) *gitlab.VisibilityValue

VisibilityValueV1alpha1ToGitlab converts *v1alpha1.VisibilityValue to *gitlab.VisibilityValue

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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