Documentation
¶
Index ¶
- func DecodePEM(certPEM []byte) tls.Certificate
- func GetSMValue(ctx context.Context, secretsManager SecretsManagerAPI, key string) ([]byte, error)
- func GetTLS(cfg TLSConfig) (*tls.Config, error)
- func MakeTLS(clientCert, key []byte) (*tls.Config, error)
- type SecretManagerConfig
- type SecretsManagerAPI
- type TLSConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodePEM ¶
func DecodePEM(certPEM []byte) tls.Certificate
DecodePEM builds a PEM certificate object
func GetSMValue ¶
Types ¶
type SecretManagerConfig ¶
type SecretManagerConfig struct { CertificateString string KeyString string SMClient SecretsManagerAPI }
SecretManagerConfig holds the key values to fetch from SM for the client cert and key
type SecretsManagerAPI ¶
type SecretsManagerAPI interface { GetSecretValue(ctx context.Context, params *secretsmanager.GetSecretValueInput, optFns ...func(*secretsmanager.Options)) (*secretsmanager.GetSecretValueOutput, error) }
SecretsManagerAPI interface for AWS Secrets Manager Client.
func SMClient ¶
func SMClient(region, endpoint string) (SecretsManagerAPI, error)
SMClient returns SecretsManagerAPI interface that implements secretsmanager.Client. `endpoint` arg can be used when developing locally.
Click to show internal directories.
Click to hide internal directories.