Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedSecretProvider = errors.New("unsupported secret provider") ErrSecretNotFound = errors.New("secret not found") )
Functions ¶
This section is empty.
Types ¶
type SecretProvider ¶
type SecretProvider struct {
// contains filtered or unexported fields
}
SecretProvider creates client based on the options provided.
func NewSecretProvider ¶
func NewSecretProvider(opts SecretProviderOptions) *SecretProvider
NewSecretProvider creates a new SecretProvider instance with the given options.
func (*SecretProvider) GetClient ¶
GetClient checks if a secret client has already been created, and if not, creates one using the secretClientFactory map. If the provider is not supported, an error is returned.
func (*SecretProvider) SetClient ¶
func (p *SecretProvider) SetClient(client secret.Client)
SetClient sets the secret client for the SecretProvider. This should be used by tests that need to mock the secret client.
type SecretProviderOptions ¶
type SecretProviderOptions struct { // Provider configures the secret provider. Provider SecretProviderType `yaml:"provider"` // ETCD configures options for the etcd secret store. ETCD dataprovider.ETCDOptions `yaml:"etcd,omitempty"` }
SecretProviderOptions contains provider information of the secret.
type SecretProviderType ¶
type SecretProviderType string
SecretProviderType represents types of secret provider.
const ( // TypeETCDSecret represents the ETCD secret provider. TypeETCDSecret SecretProviderType = "etcd" // TypeKubernetesSecret represents the Kubernetes secret provider. TypeKubernetesSecret SecretProviderType = "kubernetes" )
Click to show internal directories.
Click to hide internal directories.