Documentation
¶
Index ¶
- Constants
- Variables
- func ClientNotFound(name string) error
- func HandleCollectAllTask(ctx context.Context, _ *asynq.Task) error
- func HandleCollectAvailabilityZonesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectBucketsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectDHCPOptionSetsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectDNSRecordsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectHostedZonesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectImagesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectInstancesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectLoadBalancersTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectNetworkInterfacesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectRegionsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectSubnetsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectVPCsTask(ctx context.Context, t *asynq.Task) error
- func HandleLinkAllTask(ctx context.Context, _ *asynq.Task) error
- func LinkAvailabilityZoneWithRegion(ctx context.Context, db *bun.DB) error
- func LinkImageWithRegion(ctx context.Context, db *bun.DB) error
- func LinkInstanceWithImage(ctx context.Context, db *bun.DB) error
- func LinkInstanceWithRegion(ctx context.Context, db *bun.DB) error
- func LinkInstanceWithSubnet(ctx context.Context, db *bun.DB) error
- func LinkInstanceWithVPC(ctx context.Context, db *bun.DB) error
- func LinkLoadBalancerWithRegion(ctx context.Context, db *bun.DB) error
- func LinkLoadBalancerWithVpc(ctx context.Context, db *bun.DB) error
- func LinkNetworkInterfaceWithInstance(ctx context.Context, db *bun.DB) error
- func LinkNetworkInterfaceWithLoadBalancer(ctx context.Context, db *bun.DB) error
- func LinkRegionWithVPC(ctx context.Context, db *bun.DB) error
- func LinkSubnetWithAZ(ctx context.Context, db *bun.DB) error
- func LinkSubnetWithVPC(ctx context.Context, db *bun.DB) error
- func NewCollectAvailabilityZonesTask() *asynq.Task
- func NewCollectBucketsTask() *asynq.Task
- func NewCollectDHCPOptionSetsTask() *asynq.Task
- func NewCollectDNSRecordsTask() *asynq.Task
- func NewCollectHostedZonesTask() *asynq.Task
- func NewCollectImagesTask() *asynq.Task
- func NewCollectInstancesTask() *asynq.Task
- func NewCollectLoadBalancersTask() *asynq.Task
- func NewCollectNetworkInterfacesTask() *asynq.Task
- func NewCollectRegionsTask() *asynq.Task
- func NewCollectSubnetsTask() *asynq.Task
- func NewCollectVPCsTask() *asynq.Task
- type CollectAvailabilityZonesPayload
- type CollectBucketsPayload
- type CollectDHCPOptionSetsPayload
- type CollectDNSRecordsPayload
- type CollectHostedZonesPayload
- type CollectImagesPayload
- type CollectInstancesPayload
- type CollectLoadBalancersPayload
- type CollectNetworkInterfacesPayload
- type CollectRegionsPayload
- type CollectSubnetsPayload
- type CollectVPCsPayload
Constants ¶
const ( // TaskCollectAll is a meta task, which enqueues all relevant AWS // tasks. TaskCollectAll = "aws:task:collect-all" // TaskLinkAll is a task, which creates links between the AWS // models. TaskLinkAll = "aws:task:link-all" )
const ( // TaskCollectAvailabilityZones is the name of the task for collecting // AWS AZs. TaskCollectAvailabilityZones = "aws:task:collect-azs" )
const (
// TaskCollectBuckets is the name of the task for collecting S3 Buckets.
TaskCollectBuckets = "aws:task:collect-buckets"
)
const (
// TaskCollectDHCPOptionSets is the name of the task for collecting AWS DHCP option sets.
TaskCollectDHCPOptionSets = "aws:task:collect-dhcp-option-sets"
)
const ( // TaskCollectDNSRecords is the name of the task for collecting // AWS Route 53 DNS records from hosted zones. TaskCollectDNSRecords = "aws:task:collect-dns-record" )
const ( // TaskCollectHostedZones is the name of the task for collecting // AWS Route 53 hosted zones. TaskCollectHostedZones = "aws:task:collect-hosted-zones" )
const (
// TaskCollectImages is the name of the task for collecting AWS AMIs.
TaskCollectImages = "aws:task:collect-images"
)
const ( // TaskCollectInstances is the name of the task for collecting AWS EC2 // Instances. TaskCollectInstances = "aws:task:collect-instances" )
const ( // TaskCollectLoadBalancers is the name of the task for collecting AWS // Elastic Load Balancers (ELBs). TaskCollectLoadBalancers = "aws:task:collect-loadbalancers" )
const ( // TaskCollectNetworkInterfaces is the name of the task for collecting // AWS ENIs. TaskCollectNetworkInterfaces = "aws:task:collect-net-interfaces" )
const ( // TaskCollectRegions is the name of the task for collecting AWS // regions. TaskCollectRegions = "aws:task:collect-regions" )
const ( // TaskCollectSubnets is the name of the task for collecting AWS // Subnets. TaskCollectSubnets = "aws:task:collect-subnets" )
const (
// TaskCollectVPCs is the name of the task for collecting AWS VPCs.
TaskCollectVPCs = "aws:task:collect-vpcs"
)
Variables ¶
var ErrClientNotFound = errors.New("client not found")
ErrClientNotFound is an error which is returned when an AWS client was not found in the clientset registries.
var ErrNoAccountID = errors.New("no account id specified")
ErrNoAccountID is an error which is returned when an AWS task was called without having the required Account ID in the payload.
var ErrNoRegion = errors.New("no region name specified")
ErrNoRegion is an error, which is returned when an expected region name is missing.
Functions ¶
func ClientNotFound ¶
ClientNotFound wraps ErrClientNotFound with the given name.
func HandleCollectAllTask ¶
HandleCollectAllTask is a handler, which enqueues tasks for collecting all AWS objects.
func HandleCollectAvailabilityZonesTask ¶
HandleCollectAvailabilityZonesTask handles the task for collecting AWS AZs.
func HandleCollectBucketsTask ¶
HandleCollectBucketsTask handles the collection of AWS S3 Buckets.
func HandleCollectDHCPOptionSetsTask ¶ added in v0.1.19
HandleCollectDHCPOptionSetsTask handles the task for collecting AWS DHCP option sets.
func HandleCollectDNSRecordsTask ¶ added in v0.1.19
HandleCollectDNSRecordsTask handles the task for collecting AWS Route 53 DNS records
func HandleCollectHostedZonesTask ¶ added in v0.1.19
HandleCollectHostedZonesTask handles the task for collecting AWS Route 53 hosted zones
func HandleCollectImagesTask ¶
HandleCollectImagesTask handles the task for collecting AWS AMIs.
func HandleCollectInstancesTask ¶
HandleCollectInstancesTask handles the task for collecting EC2 Instances.
func HandleCollectLoadBalancersTask ¶
HandleCollectLoadBalancersTask handles the task for collecting AWS ELBs.
func HandleCollectNetworkInterfacesTask ¶
HandleCollectNetworkInterfacesTask handles the task for collecting AWS Elastic Network Interfaces (ENI).
func HandleCollectRegionsTask ¶
HandleCollectRegionsTask is the handler, which collects AWS Regions.
func HandleCollectSubnetsTask ¶
HandleCollectSubnetsTask collects handles the task for collecting AWS Subnets.
func HandleCollectVPCsTask ¶
HandleCollectVPCsTask handles the task for collecting AWS VPCs.
func HandleLinkAllTask ¶
HandleLinkAllTask is a handler, which establishes links between the various AWS models.
func LinkAvailabilityZoneWithRegion ¶
LinkAvailabilityZoneWithRegion creates links between the AWS AZs and Regions
func LinkImageWithRegion ¶
LinkImageWithRegion creates links between the Image and Region.
func LinkInstanceWithImage ¶
LinkInstanceWithImage creates links between the Instance and Image.
func LinkInstanceWithRegion ¶
LinkInstanceWithRegion creates links between the Instance and Region.
func LinkInstanceWithSubnet ¶
LinkInstanceWithSubnet creates links between the Instance and Subnet.
func LinkInstanceWithVPC ¶
LinkInstanceWithVPC creates links between the AWS VPC and Instance.
func LinkLoadBalancerWithRegion ¶
LinkLoadBalancerWithRegion creates links between the LoadBalancer and Region.
func LinkLoadBalancerWithVpc ¶
LinkLoadBalancerWithVpc creates links between the LoadBalancer and VPC.
func LinkNetworkInterfaceWithInstance ¶
LinkNetworkInterfaceWithInstance creates links between models.Instance and models.NetworkInterface.
func LinkNetworkInterfaceWithLoadBalancer ¶
LinkNetworkInterfaceWithLoadBalancer creates links between models.NetworkInterface and models.LoadBalancer.
func LinkRegionWithVPC ¶
LinkRegionWithVPC creates links between the AWS Region and VPC
func LinkSubnetWithAZ ¶
LinkSubnetWithAZ creates links between the AZ and Subnets.
func LinkSubnetWithVPC ¶
LinkSubnetWithVPC creates links between the AWS Subnet and VPC
func NewCollectAvailabilityZonesTask ¶
NewCollectAvailabilityZonesTask creates a new asynq.Task for collecting AWS Availability Zones without specifying a payload.
func NewCollectBucketsTask ¶
NewCollectBucketsTask creates a new asynq.Task for collecting S3 buckets, without specifying a payload.
func NewCollectDHCPOptionSetsTask ¶ added in v0.1.19
NewCollectDHCPOptionSetsTask creates a new asynq.Task for collecting AWS DHCP option sets without specifying a payload.
func NewCollectDNSRecordsTask ¶ added in v0.1.19
NewCollectDNSRecordsTask creates a new asynq.Task for collecting AWS Route 53 DNS records, without specifying a payload.
func NewCollectHostedZonesTask ¶ added in v0.1.19
NewCollectHostedZonesTask creates a new asynq.Task for collecting AWS Route 53 hosted zones, without specifying a payload.
func NewCollectImagesTask ¶
NewCollectImagesTask creates a new asynq.Task for collecting AWS AMIs without specifying a payload.
func NewCollectInstancesTask ¶
NewCollectInstancesTask creates a new asynq.Task for collecting EC2 Instances, without specifying a payload.
func NewCollectLoadBalancersTask ¶
NewCollectLoadBalancersTask creates a new asynq.Task for collecting AWS ELBs, without specifying a payload.
func NewCollectNetworkInterfacesTask ¶
NewCollectNetworkInterfacesTask creates a new asynq.Task for collecting AWS ENIs, without specifying a payload.
func NewCollectRegionsTask ¶
NewCollectRegionsTask creates a new asynq.Task task for collecting AWS regions without specifying a payload.
func NewCollectSubnetsTask ¶
NewCollectSubnetsTask creates a new asynq.Task for collecting AWS Subnets, without specifying a payload.
func NewCollectVPCsTask ¶
NewCollectVPCsTask creates a new asynq.Task for collecting AWS VPCs without specifying a payload.
Types ¶
type CollectAvailabilityZonesPayload ¶
type CollectAvailabilityZonesPayload struct {
// Region is the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectAvailabilityZonesPayload is the payload, which is used for collecting AWS AZs.
type CollectBucketsPayload ¶
type CollectBucketsPayload struct {
// AccountID specifies the AWS Account ID, which is associated with a
// registered client to use for collecting.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectBucketsPayload is the payload, which is used for collecting S3 Buckets.
type CollectDHCPOptionSetsPayload ¶ added in v0.1.19
type CollectDHCPOptionSetsPayload struct {
// Region specifies the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectDHCPOptionSetsPayload is the payload, which is used for collecting AWS DHCP option sets.
type CollectDNSRecordsPayload ¶ added in v0.1.19
type CollectDNSRecordsPayload struct {
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
// HostedZoneID specifies the hosted zone from which to collect DNS records.
HostedZoneID string `json:"hosted_zone_id" yaml:"hosted_zone_id"`
}
CollectDNSRecordsPayload represents the payload for collecting AWS Route 53 DNS records from a specific hosted zone
type CollectHostedZonesPayload ¶ added in v0.1.19
type CollectHostedZonesPayload struct {
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectHostedZonesPayload represents the payload for collecting AWS Route 53 hosted zones
type CollectImagesPayload ¶
type CollectImagesPayload struct {
// Region specifies the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
// Owners specifies owners of AMI images. Only images with the specified
// owners will be collected.
Owners []string `json:"owners" yaml:"owners"`
}
CollectImagesPayload is the payload, which is used for collecting AWS AMIs.
type CollectInstancesPayload ¶
type CollectInstancesPayload struct {
// Region specifies the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectInstancesPayload represents the payload for collecting EC2 Instances.
type CollectLoadBalancersPayload ¶
type CollectLoadBalancersPayload struct {
// Region specifies the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectLoadBalancersPayload is the payload, which is used for collecting AWS ELBs.
type CollectNetworkInterfacesPayload ¶
type CollectNetworkInterfacesPayload struct {
// Region specifies the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectNetworkInterfacesPayload represents the payload for collecting AWS Elastic Network Interfaces (ENI).
type CollectRegionsPayload ¶
type CollectRegionsPayload struct {
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectRegionsPayload is the payload, which is used to collect AWS regions.
type CollectSubnetsPayload ¶
type CollectSubnetsPayload struct {
// Region is the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectSubnetsPayload is the payload, which is used to collect AWS subnets.
type CollectVPCsPayload ¶
type CollectVPCsPayload struct {
// Region specifies the region from which to collect.
Region string `json:"region" yaml:"region"`
// AccountID specifies the AWS Account ID, which is associated with a
// registered client.
AccountID string `json:"account_id" yaml:"account_id"`
}
CollectVPCsPayload is the payload, which is used for collecting AWS VPCs.