Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AWSSecrets ¶
type AWSSecrets struct { Region string // contains filtered or unexported fields }
AWSSecrets retrieves secrets from AWS Parameter Store
func NewAWSSecrets ¶
func NewAWSSecrets(region string) *AWSSecrets
NewAWSSecrets returns an instance with optional region specified, otherwise uses us-east-1
func (*AWSSecrets) GetSecureParameter ¶
func (s *AWSSecrets) GetSecureParameter(key string) ([]byte, error)
GetSecureParameter retrieves the parameter specified by key, or error otherwise.
func (*AWSSecrets) SetSecureParameter ¶
func (s *AWSSecrets) SetSecureParameter(key, value string) error
SetSecureParameter sets the value for the specified key in AWS SSM. It is recommended you do not set parameters from code but from your cloudformation/ deployment processes instead.
type EnvSecrets ¶
type EnvSecrets struct { }
EnvSecrets retrieves secrets from environment variables
func (*EnvSecrets) GetSecureParameter ¶
func (s *EnvSecrets) GetSecureParameter(key string) ([]byte, error)
GetSecureParameter retrieves the env variable specified by key, or error otherwise.
func (*EnvSecrets) SetSecureParameter ¶
func (s *EnvSecrets) SetSecureParameter(key, value string) error
SetSecureParameter sets the value for the key specified by environment variable
type Secrets ¶
type Secrets interface { // GetSecureParameter retrieves the value from our secure parameter store GetSecureParameter(key string) ([]byte, error) // SetSecureParameter sets the value for the key in our secure parameter store SetSecureParameter(key, value string) error }
Secrets interface for securely or locally accessing secrets
type SecretsCache ¶
type SecretsCache struct { Region string Environment string // contains filtered or unexported fields }
SecretsCache for accessing cached/stored secrets
func NewSecretsCache ¶
func NewSecretsCache(env, region string) *SecretsCache
NewSecretsCache returns an instance for acquiring the secrets from either local env vars or AWS
func (*SecretsCache) GetSecureString ¶
func (s *SecretsCache) GetSecureString(key string) (string, error)
GetSecureString allows caller to provide the full key to return a string value
func (*SecretsCache) Password ¶
func (s *SecretsCache) Password() (string, error)
Password retrieves the password from our secrets implementation. Additional methods can be added to SecretsCache for ensuring uniform access.
func (*SecretsCache) SetSecureParameter ¶
func (s *SecretsCache) SetSecureParameter(key, value string) error