Documentation ¶
Index ¶
- Constants
- Variables
- type AWSData
- type Clients
- type DefaultClients
- func (c DefaultClients) GetCloudFrontClient(region string) cloudfrontiface.CloudFrontAPI
- func (c DefaultClients) GetCodeCommitClient(region string) codecommitiface.CodeCommitAPI
- func (c DefaultClients) GetDynamoDBClient(region string) dynamodbiface.DynamoDBAPI
- func (c DefaultClients) GetEC2Client(region string) ec2iface.EC2API
- func (c DefaultClients) GetECRClient(region string) ecriface.ECRAPI
- func (c DefaultClients) GetECSClient(region string) ecsiface.ECSAPI
- func (c DefaultClients) GetELBClient(region string) elbiface.ELBAPI
- func (c DefaultClients) GetELBV2Client(region string) elbv2iface.ELBV2API
- func (c DefaultClients) GetElastiCacheClient(region string) elasticacheiface.ElastiCacheAPI
- func (c DefaultClients) GetElasticsearchServiceClient(region string) elasticsearchserviceiface.ElasticsearchServiceAPI
- func (c DefaultClients) GetIAMClient(region string) iamiface.IAMAPI
- func (c DefaultClients) GetKMSClient(region string) kmsiface.KMSAPI
- func (c DefaultClients) GetLambdaClient(region string) lambdaiface.LambdaAPI
- func (c DefaultClients) GetRDSClient(region string) rdsiface.RDSAPI
- func (c DefaultClients) GetRoute53Client(region string) route53iface.Route53API
- func (c DefaultClients) GetS3Client(region string) s3iface.S3API
- func (c DefaultClients) GetSQSClient(region string) sqsiface.SQSAPI
- type ProcessRow
Constants ¶
const ( // AssetTypeCloudFrontDistribution is the value used in the AssetType field when fetching CloudFront distributions AssetTypeCloudFrontDistribution string = "CloudFront Distribution" // ServiceCloudFront is the key for the CloudFront service ServiceCloudFront string = "cloudfront" )
const ( // AssetTypeCodeCommitRepository is the value used in the AssetType field when fetching CodeCommit repositories AssetTypeCodeCommitRepository string = "CodeCommit Repository" // ServiceCodeCommit is the key for the CodeCommit service ServiceCodeCommit string = "codecommit" )
const ( // AssetTypeDynamoDBTable is the value used in the AssetType field when fetching DynamoDB tables AssetTypeDynamoDBTable string = "DynamoDB Table" // ServiceDynamoDB is the key for the DynamoDB service ServiceDynamoDB string = "dynamodb" )
const ( // AssetTypeEBSVolume is the value used in the AssetType field when fetching EBS volumes AssetTypeEBSVolume string = "EBS Volume" // ServiceEBS is the key for the EBS service ServiceEBS string = "ebs" )
const ( // AssetTypeEC2Instance is the value used in the AssetType field when fetching EC2 instances AssetTypeEC2Instance string = "EC2 Instance" // ServiceEC2 is the key for the EC2 service ServiceEC2 string = "ec2" )
const ( // AssetTypeECRImage is the value used in the AssetType field when fetching ECR images AssetTypeECRImage string = "ECR Image" // ServiceECR is the key for the ECR service ServiceECR string = "ecr" )
const ( // AssetTypeECSContainer is the value used in the AssetType field when fetching ECS containers AssetTypeECSContainer string = "ECS Container" // ServiceECS is the key for the ECS service ServiceECS string = "ecs" )
const ( // AssetTypeElastiCacheNode is the value used in the AssetType field when fetching ElastiCache nodes AssetTypeElastiCacheNode string = "ElastiCache Node" // ServiceElastiCache is the key for the ElastiCache service ServiceElastiCache string = "elasticache" )
const ( // AssetTypeELB is the value used in the AssetType field when fetching ELBs AssetTypeELB string = "ELB" // ServiceELB is the key for the ELB service ServiceELB string = "elb" )
const ( // AssetTypeALB is the value used in the AssetType field when fetching ALBs AssetTypeALB string = "ALB" // AssetTypeNLB is the value used in the AssetType field when fetching NLBs AssetTypeNLB string = "NLB" // AssetTypeGLB is the value used in the AssetType field when fetching GLBs AssetTypeGLB string = "GLB" // ServiceELBV2 is the key for the ELBV2 service ServiceELBV2 string = "elbv2" )
const ( // AssetTypeElasticsearchDomain is the value used in the AssetType field when fetching Elasticsearch domains AssetTypeElasticsearchDomain string = "Elasticsearch Domain" // ServiceElasticsearchService is the key for the ElasticsearchService service ServiceElasticsearchService string = "es" )
const ( // AssetTypeIAMUser is the value used in the AssetType field when fetching IAM users AssetTypeIAMUser string = "IAM User" // ServiceIAM is the key for the IAM service ServiceIAM string = "iam" )
const ( // AssetTypeKMSKey is the value used in the AssetType field when fetching KMS keys AssetTypeKMSKey string = "KMS Key" // ServiceKMS is the key for the KMS service ServiceKMS string = "kms" )
const ( // AssetTypeLambdaFunction is the value used in the AssetType field when fetching Lambda functions AssetTypeLambdaFunction string = "Lambda Function" // ServiceLambda is the key for the Lambda service ServiceLambda string = "lambda" )
const ( // AssetTypeRDSInstance is the value used in the AssetType field when fetching RDS instances AssetTypeRDSInstance string = "RDS Instance" // ServiceRDS is the key for the RDS service ServiceRDS string = "rds" )
const ( // AssetTypeS3Bucket is the value used in the AssetType field when fetching S3 Buckets AssetTypeS3Bucket string = "S3 Bucket" // ServiceS3 is the key for the S3 service ServiceS3 string = "s3" )
const ( // AssetTypeSQSQueue is the value used in the AssetType field when fetching SQS queues AssetTypeSQSQueue string = "SQS Queue" // ServiceSQS is the key for the SQS service ServiceSQS string = "sqs" )
Variables ¶
var ( // ErrNoRegions is logged when no regions are given to the Load method ErrNoRegions = errors.New("no regions specified") // ErrNoServices is logged when no services are given to the Load method ErrNoServices = errors.New("no services specified") )
var (
// DefaultRegion contains the region used by default and in tests
DefaultRegion = "us-east-1"
)
Functions ¶
This section is empty.
Types ¶
type AWSData ¶
type AWSData struct {
// contains filtered or unexported fields
}
AWSData is responsible for concurrently loading data from AWS and storing it based on the regions and services provided
func (*AWSData) Load ¶
func (d *AWSData) Load(regions, services []string, processRow ProcessRow)
Load concurrently the required data based on the regions and services provided
func (*AWSData) PrintRegions ¶
func (d *AWSData) PrintRegions()
PrintRegions lists all available AWS regions as used by the command line `print-regions` option
type Clients ¶
type Clients interface { GetCloudFrontClient(region string) cloudfrontiface.CloudFrontAPI GetCodeCommitClient(region string) codecommitiface.CodeCommitAPI GetDynamoDBClient(region string) dynamodbiface.DynamoDBAPI GetEC2Client(region string) ec2iface.EC2API GetECRClient(region string) ecriface.ECRAPI GetECSClient(region string) ecsiface.ECSAPI GetElastiCacheClient(region string) elasticacheiface.ElastiCacheAPI GetElasticsearchServiceClient(region string) elasticsearchserviceiface.ElasticsearchServiceAPI GetELBClient(region string) elbiface.ELBAPI GetELBV2Client(region string) elbv2iface.ELBV2API GetIAMClient(region string) iamiface.IAMAPI GetKMSClient(region string) kmsiface.KMSAPI GetLambdaClient(region string) lambdaiface.LambdaAPI GetRDSClient(region string) rdsiface.RDSAPI GetRoute53Client(region string) route53iface.Route53API GetS3Client(region string) s3iface.S3API GetSQSClient(region string) sqsiface.SQSAPI }
Clients is an interface for getting new AWS service clients
type DefaultClients ¶
type DefaultClients struct{}
DefaultClients holds the default methods for creating AWS service clients
func (DefaultClients) GetCloudFrontClient ¶
func (c DefaultClients) GetCloudFrontClient(region string) cloudfrontiface.CloudFrontAPI
GetCloudFrontClient returns a new CloudFront client for the given region
func (DefaultClients) GetCodeCommitClient ¶
func (c DefaultClients) GetCodeCommitClient(region string) codecommitiface.CodeCommitAPI
GetCodeCommitClient returns a new CodeCommit client for the given region
func (DefaultClients) GetDynamoDBClient ¶
func (c DefaultClients) GetDynamoDBClient(region string) dynamodbiface.DynamoDBAPI
GetDynamoDBClient returns a new DynamoDB client for the given region
func (DefaultClients) GetEC2Client ¶
func (c DefaultClients) GetEC2Client(region string) ec2iface.EC2API
GetEC2Client returns a new EC2 client for the given region
func (DefaultClients) GetECRClient ¶
func (c DefaultClients) GetECRClient(region string) ecriface.ECRAPI
GetECRClient returns a new ECS client for the given region
func (DefaultClients) GetECSClient ¶
func (c DefaultClients) GetECSClient(region string) ecsiface.ECSAPI
GetECSClient returns a new ECS client for the given region
func (DefaultClients) GetELBClient ¶
func (c DefaultClients) GetELBClient(region string) elbiface.ELBAPI
GetELBClient returns a new ELB client for the given region
func (DefaultClients) GetELBV2Client ¶
func (c DefaultClients) GetELBV2Client(region string) elbv2iface.ELBV2API
GetELBV2Client returns a new ELBV2 client for the given region
func (DefaultClients) GetElastiCacheClient ¶
func (c DefaultClients) GetElastiCacheClient(region string) elasticacheiface.ElastiCacheAPI
GetElastiCacheClient returns a new ElastiCache client for the given region
func (DefaultClients) GetElasticsearchServiceClient ¶
func (c DefaultClients) GetElasticsearchServiceClient(region string) elasticsearchserviceiface.ElasticsearchServiceAPI
GetElasticsearchServiceClient returns a new ElasticsearchService client for the given region
func (DefaultClients) GetIAMClient ¶
func (c DefaultClients) GetIAMClient(region string) iamiface.IAMAPI
GetIAMClient returns a new IAM client for the given region
func (DefaultClients) GetKMSClient ¶
func (c DefaultClients) GetKMSClient(region string) kmsiface.KMSAPI
GetKMSClient returns a new KMS client for the given region
func (DefaultClients) GetLambdaClient ¶
func (c DefaultClients) GetLambdaClient(region string) lambdaiface.LambdaAPI
GetLambdaClient returns a new RDS client for the given region
func (DefaultClients) GetRDSClient ¶
func (c DefaultClients) GetRDSClient(region string) rdsiface.RDSAPI
GetRDSClient returns a new RDS client for the given region
func (DefaultClients) GetRoute53Client ¶
func (c DefaultClients) GetRoute53Client(region string) route53iface.Route53API
GetRoute53Client returns a new Route53 client for the given region
func (DefaultClients) GetS3Client ¶
func (c DefaultClients) GetS3Client(region string) s3iface.S3API
GetS3Client returns a new S3 client for the given region
func (DefaultClients) GetSQSClient ¶
func (c DefaultClients) GetSQSClient(region string) sqsiface.SQSAPI
GetSQSClient returns a new SQS client for the given region
type ProcessRow ¶
ProcessRow takes an inventory row, performs some action, and returns an error