aws

package
v0.0.0-...-eafc989 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound asserts notFoundError.

Types

type CFClient

CFClient describes the methods required to be implemented by a CloudFormation AWS client.

type Cleaner

type Cleaner struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) (*Cleaner, error)

func (*Cleaner) Clean

func (a *Cleaner) Clean() error

Clean calls our cleaner functions and logs errors if they happen. We don't return errors as we want all cleaners to be called.

type Config

type Config struct {
	EC2Client     EC2Client
	CFClient      CFClient
	Logger        micrologger.Logger
	Route53Client Route53Client
	S3Client      S3Client
}

type EC2Client

type EC2Client interface {
	DescribeInstances(*ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)
	ModifyInstanceAttribute(*ec2.ModifyInstanceAttributeInput) (*ec2.ModifyInstanceAttributeOutput, error)
}

EC2Client describes the methods required to be implemented by a EC2 AWS client.

type Route53Client

type Route53Client interface {
	ListHostedZones(input *route53.ListHostedZonesInput) (*route53.ListHostedZonesOutput, error)
}

type S3Client

type S3Client interface {
	ListBuckets(*s3.ListBucketsInput) (*s3.ListBucketsOutput, error)
	DeleteBucket(*s3.DeleteBucketInput) (*s3.DeleteBucketOutput, error)
	ListObjectsV2(*s3.ListObjectsV2Input) (*s3.ListObjectsV2Output, error)
	DeleteObject(*s3.DeleteObjectInput) (*s3.DeleteObjectOutput, error)
	DeleteObjects(*s3.DeleteObjectsInput) (*s3.DeleteObjectsOutput, error)
}

S3Client describes the methods required to be implemented by a S3 AWS client.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL