Documentation ¶
Index ¶
- type AWSSecrets
- type EnvSecrets
- type Secrets
- type SecretsCache
- func (s *SecretsCache) BigQueryCredentials() (string, error)
- func (s *SecretsCache) DBString(serviceKey string) (string, error)
- func (s *SecretsCache) DNSAddresses() ([]string, error)
- func (s *SecretsCache) DiscoveryAddr() (string, error)
- func (s *SecretsCache) GetPortScanToken() (string, error)
- func (s *SecretsCache) GetSecureString(key string) (string, error)
- func (s *SecretsCache) ServicePassword(serviceKey string) (string, error)
- func (s *SecretsCache) SetSystemIDs(orgID, userID int) error
- func (s *SecretsCache) StateAddr() (string, error)
- func (s *SecretsCache) StatePassword() (string, error)
- func (s *SecretsCache) SystemOrgID() (int, error)
- func (s *SecretsCache) SystemUserID() (int, error)
- func (s *SecretsCache) WebFilePath() (string, error)
- func (s *SecretsCache) WithCredentials(id, key string)
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
func (*AWSSecrets) WithCredentials ¶
func (s *AWSSecrets) WithCredentials(id, key string)
WithCredentials creates a session with credentials
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
func (*EnvSecrets) WithCredentials ¶
func (s *EnvSecrets) WithCredentials(id, key string)
WithCredentials not necessary for local testing
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) BigQueryCredentials ¶
func (s *SecretsCache) BigQueryCredentials() (string, error)
func (*SecretsCache) DBString ¶
func (s *SecretsCache) DBString(serviceKey string) (string, error)
DBString returns the database connection string for the environment and service
func (*SecretsCache) DNSAddresses ¶
func (s *SecretsCache) DNSAddresses() ([]string, error)
func (*SecretsCache) DiscoveryAddr ¶
func (s *SecretsCache) DiscoveryAddr() (string, error)
func (*SecretsCache) GetPortScanToken ¶
func (s *SecretsCache) GetPortScanToken() (string, error)
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) ServicePassword ¶
func (s *SecretsCache) ServicePassword(serviceKey string) (string, error)
ServicePassword retrieves the password for the initialized servicekey
func (*SecretsCache) SetSystemIDs ¶
func (s *SecretsCache) SetSystemIDs(orgID, userID int) error
func (*SecretsCache) StateAddr ¶
func (s *SecretsCache) StateAddr() (string, error)
func (*SecretsCache) StatePassword ¶
func (s *SecretsCache) StatePassword() (string, error)
func (*SecretsCache) SystemOrgID ¶
func (s *SecretsCache) SystemOrgID() (int, error)
func (*SecretsCache) SystemUserID ¶
func (s *SecretsCache) SystemUserID() (int, error)
func (*SecretsCache) WebFilePath ¶
func (s *SecretsCache) WebFilePath() (string, error)
func (*SecretsCache) WithCredentials ¶
func (s *SecretsCache) WithCredentials(id, key string)