Documentation ¶
Index ¶
- type GetSecretID
- type GetSecretValue
- type SecretsManagerStorage
- func (s SecretsManagerStorage) Get(keyID string) (httpsignatures.Secret, error)
- func (s *SecretsManagerStorage) SetAlgorithm(a string)
- func (s *SecretsManagerStorage) SetCacheExpiresSeconds(e uint32)
- func (s *SecretsManagerStorage) SetGetSecretIDFunc(f GetSecretID)
- func (s *SecretsManagerStorage) SetGetSecretValueFunc(f GetSecretValue)
- func (s *SecretsManagerStorage) SetRequiredPrivateKeys(l map[string]bool)
- func (s *SecretsManagerStorage) SetRequiredPublicKeys(l map[string]bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetSecretID ¶
type GetSecretID = func(env string, keyType string, keyID string, requiredPrivateKeys map[string]bool, requiredPublicKeys map[string]bool) (string, error)
GetSecretID function construct SecretId in aws secrets manager based on: ENV (prod, dev etc), keyID (service identifier), keyType (PrivateKey/PublicKey/Algorithm) It's possible to skip PrivateKey/PublicKey for certain keyIDs, just pass map with keyID you want to skip.
type GetSecretValue ¶
GetSecretValue function convert value from secrets manager to Secret
type SecretsManagerStorage ¶
type SecretsManagerStorage struct {
// contains filtered or unexported fields
}
SecretsManagerStorage AWS Secrets Manager storage
func NewAwsSecretsManagerStorage ¶
func NewAwsSecretsManagerStorage(env string, sm secretsmanageriface.SecretsManagerAPI) *SecretsManagerStorage
NewAwsSecretsManagerStorage create storage
func (SecretsManagerStorage) Get ¶
func (s SecretsManagerStorage) Get(keyID string) (httpsignatures.Secret, error)
Get get secret from cache by KeyID or from AWS Secrets Manager for first time
func (*SecretsManagerStorage) SetAlgorithm ¶
func (s *SecretsManagerStorage) SetAlgorithm(a string)
SetAlgorithm set static algorithm for all keys. This allow not to store algorithm in AWS Secrets Manager.
func (*SecretsManagerStorage) SetCacheExpiresSeconds ¶
func (s *SecretsManagerStorage) SetCacheExpiresSeconds(e uint32)
SetCacheExpiresSeconds set default cache expires seconds.
func (*SecretsManagerStorage) SetGetSecretIDFunc ¶
func (s *SecretsManagerStorage) SetGetSecretIDFunc(f GetSecretID)
SetGetSecretIDFunc set custom function to build secret ID in AWS SecretsManager.
func (*SecretsManagerStorage) SetGetSecretValueFunc ¶
func (s *SecretsManagerStorage) SetGetSecretValueFunc(f GetSecretValue)
SetGetSecretValueFunc set custom function to extract value from secret.
func (*SecretsManagerStorage) SetRequiredPrivateKeys ¶
func (s *SecretsManagerStorage) SetRequiredPrivateKeys(l map[string]bool)
SetRequiredPrivateKeys set keys with required PrivateKey secrets.
func (*SecretsManagerStorage) SetRequiredPublicKeys ¶
func (s *SecretsManagerStorage) SetRequiredPublicKeys(l map[string]bool)
SetRequiredPublicKeys set keys with required PublicKey secrets.