Documentation
¶
Index ¶
- Constants
- func GetTokenValueFromLocalSecret(ctx context.Context, client client.Client, m resource.Managed, ...) (*string, error)
- func GetTokenValueFromSecret(ctx context.Context, client client.Client, m resource.Managed, ...) (*string, error)
- func NewClient(c Config) *gitlab.Client
- func TestCreateLocalSecretKeySelector(name, key string) *xpv1.LocalSecretKeySelector
- func TestCreateLocalSecretReference(name string) *xpv1.LocalSecretReference
- func TestCreateSecretKeySelector(name, key string) *xpv1.SecretKeySelector
- func TestCreateSecretReference(name string) *xpv1.SecretReference
- type BasicAuth
- type Config
- func GetConfig(ctx context.Context, c client.Client, mg resource.Managed) (*Config, error)
- func UseLegacyProviderConfig(ctx context.Context, c client.Client, mg resource.LegacyManaged) (*Config, error)
- func UseProvicerConfig(ctx context.Context, c client.Client, mg resource.ModernManaged) (*Config, error)
Constants ¶
const ( ErrSecretNotFound = "Cannot find referenced secret" ErrSecretKeyNotFound = "Cannot find key in referenced secret" ErrSecretSelectorNil = "Secret selector is nil" )
Variables ¶
This section is empty.
Functions ¶
func GetTokenValueFromSecret ¶
func NewClient ¶
NewClient creates new Gitlab Client with provided Gitlab Configurations/Credentials.
func TestCreateLocalSecretKeySelector ¶
func TestCreateLocalSecretKeySelector(name, key string) *xpv1.LocalSecretKeySelector
CreateLocalSecretKeySelector creates a LocalSecretKeySelector for testing
func TestCreateLocalSecretReference ¶
func TestCreateLocalSecretReference(name string) *xpv1.LocalSecretReference
CreateLocalSecretKeySelector creates a LocalSecretKeySelector for testing
func TestCreateSecretKeySelector ¶
func TestCreateSecretKeySelector(name, key string) *xpv1.SecretKeySelector
CreateSecretKeySelector creates a SecretKeySelector for testing
func TestCreateSecretReference ¶
func TestCreateSecretReference(name string) *xpv1.SecretReference
CreateSecretKeySelector creates a SecretKeySelector for testing
Types ¶
type BasicAuth ¶
BasicAuth is the expected struct that can be passed in the Config.Token field to add support for BasicAuth AuthMethod
type Config ¶
Config provides gitlab configurations for the Gitlab client
func GetConfig ¶
GetConfig constructs a Config that can be used to authenticate to Gitlab API by the Gitlab Go client
func UseLegacyProviderConfig ¶
func UseLegacyProviderConfig(ctx context.Context, c client.Client, mg resource.LegacyManaged) (*Config, error)
UseProviderConfig to produce a config that can be used to authenticate to Gitlab.