Documentation ¶
Index ¶
- func IsEmptyAmazonAccountID(err error) bool
- func IsInvalidConfig(err error) bool
- func IsMalformedAmazonAccountID(err error) bool
- func IsWrongAmazonAccountIDLength(err error) bool
- func ValidateAccountID(accountID string) error
- type AwsServiceMock
- type Clients
- type Config
- type Interface
- type KMSClient
- type STSClient
- type STSClientMock
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEmptyAmazonAccountID ¶
IsEmptyAmazonAccountID asserts emptyAmazonAccountIDError.
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsMalformedAmazonAccountID ¶
IsMalformedAmazonAccountID asserts malformedAmazonAccountIDError.
func IsWrongAmazonAccountIDLength ¶
IsWrongAmazonIDLength asserts wrongAmazonAccountIDLengthError.
func ValidateAccountID ¶
ValidateAccountID validates the AWS Account ID.
Types ¶
type AwsServiceMock ¶
func (AwsServiceMock) GetAccountID ¶
func (a AwsServiceMock) GetAccountID() (string, error)
type Config ¶
type Config struct { // Dependencies. Clients Clients Logger micrologger.Logger }
Config represents the configuration used to create a new aws service.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig provides a default configuration to create a new aws service by best effort.
type KMSClient ¶
type KMSClient interface {
DescribeKey(*kms.DescribeKeyInput) (*kms.DescribeKeyOutput, error)
}
KMSClient describes the methods required to be implemented by a KMS AWS client.
type STSClient ¶
type STSClient interface {
GetCallerIdentity(*sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)
}
STSClient describes the methods required to be implemented by a STS AWS client.
type STSClientMock ¶
func (*STSClientMock) GetCallerIdentity ¶
func (i *STSClientMock) GetCallerIdentity(input *sts.GetCallerIdentityInput) (*sts.GetCallerIdentityOutput, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the aws service.
func (*Service) GetAccountID ¶
GetAccountID gets the AWS Account ID.