Documentation ¶
Index ¶
- type SecretProvider
- func (s *SecretProvider) GetDatabaseCredentials(database db.DatabaseInfo) (common.Credentials, error)
- func (s *SecretProvider) GetSecrets(path string, keys ...string) (map[string]string, error)
- func (s *SecretProvider) Initialize(ctx context.Context) bool
- func (s *SecretProvider) StoreSecrets(path string, secrets map[string]string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecretProvider ¶
type SecretProvider struct {
// contains filtered or unexported fields
}
SecretProvider cache storage for the secrets
func NewSecretProvider ¶ added in v1.1.0
func NewSecretProvider(loggingClient logger.LoggingClient, configuration *common.ConfigurationStruct) *SecretProvider
NewSecretProvider returns a new secret provider
func (*SecretProvider) GetDatabaseCredentials ¶
func (s *SecretProvider) GetDatabaseCredentials(database db.DatabaseInfo) (common.Credentials, error)
GetDatabaseCredentials retrieves the login credentials for the database If security is disabled then we use the insecure credentials supplied by the configuration.
func (*SecretProvider) GetSecrets ¶ added in v1.1.0
GetSecrets retrieves secrets from a secret store. path specifies the type or location of the secrets to retrieve. keys specifies the secrets which to retrieve. If no keys are provided then all the keys associated with the specified path will be returned.
func (*SecretProvider) Initialize ¶ added in v1.1.0
func (s *SecretProvider) Initialize(ctx context.Context) bool
Initialize creates a SecretClient to be used for obtaining secrets from a secrets store manager.
func (*SecretProvider) StoreSecrets ¶ added in v1.1.0
func (s *SecretProvider) StoreSecrets(path string, secrets map[string]string) error
StoreSecrets stores the secrets to a secret store. it sets the values requested at provided keys path specifies the type or location of the secrets to store secrets map specifies the "key": "value" pairs of secrets to store