Documentation ¶
Index ¶
- Constants
- func NewAPI() *secretsmanager.SecretsManager
- func NewAPIForRegion(region string) secretsmanageriface.SecretsManagerAPI
- func NewFromRegion(region string) client.ConfigProvider
- func NewFromRegionAndProfile(region string, awsProfile string) (client.ConfigProvider, error)
- func NewSession() client.ConfigProvider
- type Client
- type MockClient
Constants ¶
View Source
const DefaultRegion = "eu-west-1"
View Source
const MockSecretValue string = "@MY_SECRET_VALUE@"
MockSecretValue is a dummy value for the mocks
View Source
const SMPatern = "arn:aws:secretsmanager:"
Variables ¶
This section is empty.
Functions ¶
func NewAPI ¶
func NewAPI() *secretsmanager.SecretsManager
NewAPI returns a new concrete AWS SM client
func NewAPIForRegion ¶
func NewAPIForRegion(region string) secretsmanageriface.SecretsManagerAPI
NewAPIForRegion returns a new concrete AWS SM client for a specific region
func NewFromRegion ¶
func NewFromRegion(region string) client.ConfigProvider
NewFromRegion returns a session given a region
func NewFromRegionAndProfile ¶
func NewFromRegionAndProfile(region string, awsProfile string) (client.ConfigProvider, error)
NewFromRegionAndProfile returns a session given a region and aws profile
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a SM custom client
func NewClient ¶
func NewClient(api secretsmanageriface.SecretsManagerAPI) *Client
NewClient returns a new Client from an AWS SM client
func (*Client) ExtractPath ¶
func (*Client) ExtractRegion ¶
type MockClient ¶
type MockClient struct { secretsmanageriface.SecretsManagerAPI GetSecretShouldFail bool DescribeSecretShouldFail bool ShouldBeEmpty bool SecretValue string }
MockClient is an AWS secretsmanager client mock
func (*MockClient) DescribeSecret ¶
func (m *MockClient) DescribeSecret(input *secretsmanager.DescribeSecretInput) (*secretsmanager.DescribeSecretOutput, error)
DescribeSecret is a mock implementation of the sm method
func (*MockClient) GetSecretValue ¶
func (m *MockClient) GetSecretValue(input *secretsmanager.GetSecretValueInput) (*secretsmanager.GetSecretValueOutput, error)
GetSecretValue is a mock implementation of secretsmanager method
Click to show internal directories.
Click to hide internal directories.