Documentation ¶
Index ¶
- func NewMockSession() (*session.Session, *httptest.Server)
- type ASG
- type Client
- func (c *Client) WithASG(conf *aws.Config) *Client
- func (c *Client) WithAllServices(conf *aws.Config) *Client
- func (c *Client) WithEC2(conf *aws.Config) *Client
- func (c *Client) WithFirehose(conf *aws.Config) *Client
- func (c *Client) WithIAM(conf *aws.Config) *Client
- func (c *Client) WithKMS(conf *aws.Config) *Client
- func (c *Client) WithLambda(conf *aws.Config) *Client
- func (c *Client) WithMockASG(ctrl *gomock.Controller) (*Client, *mocks.MockAutoScalingAPI)
- func (c *Client) WithMockEC2(ctrl *gomock.Controller) (*Client, *mocks.MockEC2API)
- func (c *Client) WithMockFirehose(ctrl *gomock.Controller) (*Client, *mocks.MockFirehoseAPI)
- func (c *Client) WithMockIAM(ctrl *gomock.Controller) (*Client, *mocks.MockIAMAPI)
- func (c *Client) WithMockKMS(ctrl *gomock.Controller) (*Client, *mocks.MockKMSAPI)
- func (c *Client) WithMockLambda(ctrl *gomock.Controller) (*Client, *mocks.MockLambdaAPI)
- func (c *Client) WithMockOrganizations(ctrl *gomock.Controller) (*Client, *mocks.MockOrganizationsAPI)
- func (c *Client) WithMockS3(ctrl *gomock.Controller) (*Client, *mocks.MockS3API, *mocks.MockDownloaderAPI)
- func (c *Client) WithMockSSM(ctrl *gomock.Controller) (*Client, *mocks.MockSSMAPI)
- func (c *Client) WithMockSTS(ctrl *gomock.Controller) (*Client, *mocks.MockSTSAPI)
- func (c *Client) WithMockSecretsManager(ctrl *gomock.Controller) (*Client, *mocks.MockSecretsManagerAPI)
- func (c *Client) WithMockSupport(ctrl *gomock.Controller) (*Client, *mocks.MockSupportAPI)
- func (c *Client) WithOrganizations(conf *aws.Config) *Client
- func (c *Client) WithS3(conf *aws.Config) *Client
- func (c *Client) WithSSM(conf *aws.Config) *Client
- func (c *Client) WithSTS(conf *aws.Config) *Client
- func (c *Client) WithSecretsManager(conf *aws.Config) *Client
- func (c *Client) WithSupport(conf *aws.Config) *Client
- type EC2
- type Firehose
- type IAM
- func (i *IAM) GetAnMFASerial(ctx context.Context, username *string) (string, error)
- func (i *IAM) GetCurrentUser(ctx context.Context) (*iam.User, error)
- func (i *IAM) GetLoginProfile(ctx context.Context, username string) (*iam.LoginProfile, error)
- func (i *IAM) GetMFASerials(ctx context.Context, username *string) ([]string, error)
- func (i *IAM) GetUser(ctx context.Context, username *string) (*iam.User, error)
- func (i *IAM) ListAllUsers(ctx context.Context, f func(*iam.User)) error
- type KMS
- type Lambda
- type Organizations
- type S3
- func (s *S3) GetBucketACL(ctx context.Context, bucketName string) (*s3.GetBucketAclOutput, error)
- func (s *S3) GetBucketLocation(ctx context.Context, bucketName string) (string, error)
- func (s *S3) GetBucketTagging(ctx context.Context, bucketName string) (*s3.GetBucketTaggingOutput, error)
- func (s *S3) ListBuckets(ctx context.Context) (*s3.ListBucketsOutput, error)
- type SSM
- type STS
- type SecretsManager
- type Support
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct { // services ASG *ASG EC2 *EC2 IAM *IAM KMS *KMS Lambda *Lambda S3 *S3 Firehose *Firehose SecretsManager *SecretsManager SSM *SSM STS *STS Support *Support Organizations *Organizations // contains filtered or unexported fields }
Client is an aws client
func (*Client) WithAllServices ¶
WithAllServices Convenience method that configures all services with the same aws.Config
func (*Client) WithFirehose ¶
WithFirehose configures the firehose service
func (*Client) WithLambda ¶
WithLambda configures the lambda service
func (*Client) WithMockASG ¶
func (c *Client) WithMockASG(ctrl *gomock.Controller) (*Client, *mocks.MockAutoScalingAPI)
WithMockASG mocks the ASG svc
func (*Client) WithMockEC2 ¶
func (c *Client) WithMockEC2(ctrl *gomock.Controller) (*Client, *mocks.MockEC2API)
func (*Client) WithMockFirehose ¶
func (c *Client) WithMockFirehose(ctrl *gomock.Controller) (*Client, *mocks.MockFirehoseAPI)
func (*Client) WithMockIAM ¶
func (c *Client) WithMockIAM(ctrl *gomock.Controller) (*Client, *mocks.MockIAMAPI)
WithMockIAM mocks iam svc
func (*Client) WithMockKMS ¶
func (c *Client) WithMockKMS(ctrl *gomock.Controller) (*Client, *mocks.MockKMSAPI)
WithMockKMS mocks the kms service
func (*Client) WithMockLambda ¶
func (c *Client) WithMockLambda(ctrl *gomock.Controller) (*Client, *mocks.MockLambdaAPI)
WithMockLambda mocks the lambda service
func (*Client) WithMockOrganizations ¶
func (c *Client) WithMockOrganizations(ctrl *gomock.Controller) (*Client, *mocks.MockOrganizationsAPI)
func (*Client) WithMockS3 ¶
func (c *Client) WithMockS3(ctrl *gomock.Controller) (*Client, *mocks.MockS3API, *mocks.MockDownloaderAPI)
WithMockS3 mocks s3 svc
func (*Client) WithMockSSM ¶
func (c *Client) WithMockSSM(ctrl *gomock.Controller) (*Client, *mocks.MockSSMAPI)
WithMockSSM mocks the SSM service
func (*Client) WithMockSTS ¶
func (c *Client) WithMockSTS(ctrl *gomock.Controller) (*Client, *mocks.MockSTSAPI)
WithMockSTS mocks the STS service
func (*Client) WithMockSecretsManager ¶
func (c *Client) WithMockSecretsManager(ctrl *gomock.Controller) (*Client, *mocks.MockSecretsManagerAPI)
WithMockSecretsManager mocks the Secrets Manager svc
func (*Client) WithMockSupport ¶
func (c *Client) WithMockSupport(ctrl *gomock.Controller) (*Client, *mocks.MockSupportAPI)
func (*Client) WithOrganizations ¶
WithOrganizations configures an Organizations svc
func (*Client) WithSecretsManager ¶
WithSecretsManager configures a Secrets Manager svc
type EC2 ¶
EC2 is an ec2 svc
func NewEC2 ¶
func NewEC2(c client.ConfigProvider, config *aws.Config) *EC2
NewEC2 returns a new EC2 svc
func (*EC2) GetAllInstances ¶
GetAllInstances will walk all instances and call func for each
type Firehose ¶
type Firehose struct {
Svc firehoseiface.FirehoseAPI
}
Firehose is a firehose service
func NewFirehose ¶
func NewFirehose(c client.ConfigProvider, config *aws.Config) *Firehose
NewFirehose returns a new firehose service
type IAM ¶
IAM is an iam service
func NewIAM ¶
func NewIAM(c client.ConfigProvider, config *aws.Config) *IAM
NewIAM returns a new IAM svc
func (*IAM) GetAnMFASerial ¶
GetAnMFASerial returns the first MFA serial on the user, errors if no MFA found
func (*IAM) GetCurrentUser ¶
GetCurrentUser describes the calling user
func (*IAM) GetLoginProfile ¶
GetLoginProfile gets the login profile for this user if it exists
func (*IAM) GetMFASerials ¶
GetMFASerials gets the mfaSerials for the username
type KMS ¶
KMS is a kms client
func NewKMS ¶
func NewKMS(s client.ConfigProvider, conf *aws.Config) *KMS
NewKMS returns a KMS client
type Lambda ¶
type Lambda struct {
Svc lambdaiface.LambdaAPI
}
Lambda is a Lambda client
func NewLambda ¶
func NewLambda(c client.ConfigProvider, config *aws.Config) *Lambda
NewLambda returns a Lambda client
func (*Lambda) Execute ¶
Execute executes the given function with the given payload and returns the output
func (*Lambda) ExecuteWithQualifier ¶
func (l *Lambda) ExecuteWithQualifier(ctx context.Context, functionName string, functionQualifier *string, payload []byte) ([]byte, error)
ExecuteWithQualifier executes the given function with the given payload and qualifier (lambda version) and returns the output
type Organizations ¶
type Organizations struct {
Svc organizationsiface.OrganizationsAPI
}
Organizations is a organizations interface
func NewOrganizations ¶
func NewOrganizations(c client.ConfigProvider, config *aws.Config) *Organizations
NewOrganizations will return Organizations
type S3 ¶
type S3 struct { Svc s3iface.S3API Downloader s3manageriface.DownloaderAPI }
S3 is an s3 client
func (*S3) GetBucketACL ¶
GetBucketACL gets the bucket's ACL
func (*S3) GetBucketLocation ¶
GetBucketLocation gets the bucket's location (region)
func (*S3) GetBucketTagging ¶
func (s *S3) GetBucketTagging(ctx context.Context, bucketName string) (*s3.GetBucketTaggingOutput, error)
GetBucketTagging returns the bucket's tags
func (*S3) ListBuckets ¶
ListBuckets lists buckets
type SecretsManager ¶
type SecretsManager struct {
Svc secretsmanageriface.SecretsManagerAPI
}
SecretsManager is a secretsmanager service
func NewSecretsManager ¶
func NewSecretsManager(c client.ConfigProvider, config *aws.Config) *SecretsManager
NewSecretsManager returns a new secrets manager
func (*SecretsManager) ReadStringLatestVersion ¶
func (s *SecretsManager) ReadStringLatestVersion(ctx context.Context, secretID string) (*string, error)
ReadStringLatestVersion reads the latest verison of a string secret
type Support ¶
type Support struct {
Svc supportiface.SupportAPI
}
Support is a support interface
func NewSupport ¶
func NewSupport(c client.ConfigProvider, config *aws.Config) *Support
NewSupport will return Support