tasks

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
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"
)
View Source
const (
	// TaskCollectAvailabilityZones is the name of the task for collecting
	// AWS AZs.
	TaskCollectAvailabilityZones = "aws:task:collect-azs"
)
View Source
const (
	// TaskCollectBuckets is the name of the task for collecting S3 Buckets.
	TaskCollectBuckets = "aws:task:collect-buckets"
)
View Source
const (
	// TaskCollectDHCPOptionSets is the name of the task for collecting AWS DHCP option sets.
	TaskCollectDHCPOptionSets = "aws:task:collect-dhcp-option-sets"
)
View Source
const (
	// TaskCollectDNSRecords is the name of the task for collecting
	// AWS Route 53 DNS records from hosted zones.
	TaskCollectDNSRecords = "aws:task:collect-dns-record"
)
View Source
const (
	// TaskCollectHostedZones is the name of the task for collecting
	// AWS Route 53 hosted zones.
	TaskCollectHostedZones = "aws:task:collect-hosted-zones"
)
View Source
const (
	// TaskCollectImages is the name of the task for collecting AWS AMIs.
	TaskCollectImages = "aws:task:collect-images"
)
View Source
const (
	// TaskCollectInstances is the name of the task for collecting AWS EC2
	// Instances.
	TaskCollectInstances = "aws:task:collect-instances"
)
View Source
const (
	// TaskCollectLoadBalancers is the name of the task for collecting AWS
	// Elastic Load Balancers (ELBs).
	TaskCollectLoadBalancers = "aws:task:collect-loadbalancers"
)
View Source
const (
	// TaskCollectNetworkInterfaces is the name of the task for collecting
	// AWS ENIs.
	TaskCollectNetworkInterfaces = "aws:task:collect-net-interfaces"
)
View Source
const (
	// TaskCollectRegions is the name of the task for collecting AWS
	// regions.
	TaskCollectRegions = "aws:task:collect-regions"
)
View Source
const (
	// TaskCollectSubnets is the name of the task for collecting AWS
	// Subnets.
	TaskCollectSubnets = "aws:task:collect-subnets"
)
View Source
const (
	// TaskCollectVPCs is the name of the task for collecting AWS VPCs.
	TaskCollectVPCs = "aws:task:collect-vpcs"
)

Variables

View Source
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.

View Source
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.

View Source
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

func ClientNotFound(name string) error

ClientNotFound wraps ErrClientNotFound with the given name.

func HandleCollectAllTask

func HandleCollectAllTask(ctx context.Context, _ *asynq.Task) error

HandleCollectAllTask is a handler, which enqueues tasks for collecting all AWS objects.

func HandleCollectAvailabilityZonesTask

func HandleCollectAvailabilityZonesTask(ctx context.Context, t *asynq.Task) error

HandleCollectAvailabilityZonesTask handles the task for collecting AWS AZs.

func HandleCollectBucketsTask

func HandleCollectBucketsTask(ctx context.Context, t *asynq.Task) error

HandleCollectBucketsTask handles the collection of AWS S3 Buckets.

func HandleCollectDHCPOptionSetsTask added in v0.1.19

func HandleCollectDHCPOptionSetsTask(ctx context.Context, t *asynq.Task) error

HandleCollectDHCPOptionSetsTask handles the task for collecting AWS DHCP option sets.

func HandleCollectDNSRecordsTask added in v0.1.19

func HandleCollectDNSRecordsTask(ctx context.Context, t *asynq.Task) error

HandleCollectDNSRecordsTask handles the task for collecting AWS Route 53 DNS records

func HandleCollectHostedZonesTask added in v0.1.19

func HandleCollectHostedZonesTask(ctx context.Context, t *asynq.Task) error

HandleCollectHostedZonesTask handles the task for collecting AWS Route 53 hosted zones

func HandleCollectImagesTask

func HandleCollectImagesTask(ctx context.Context, t *asynq.Task) error

HandleCollectImagesTask handles the task for collecting AWS AMIs.

func HandleCollectInstancesTask

func HandleCollectInstancesTask(ctx context.Context, t *asynq.Task) error

HandleCollectInstancesTask handles the task for collecting EC2 Instances.

func HandleCollectLoadBalancersTask

func HandleCollectLoadBalancersTask(ctx context.Context, t *asynq.Task) error

HandleCollectLoadBalancersTask handles the task for collecting AWS ELBs.

func HandleCollectNetworkInterfacesTask

func HandleCollectNetworkInterfacesTask(ctx context.Context, t *asynq.Task) error

HandleCollectNetworkInterfacesTask handles the task for collecting AWS Elastic Network Interfaces (ENI).

func HandleCollectRegionsTask

func HandleCollectRegionsTask(ctx context.Context, t *asynq.Task) error

HandleCollectRegionsTask is the handler, which collects AWS Regions.

func HandleCollectSubnetsTask

func HandleCollectSubnetsTask(ctx context.Context, t *asynq.Task) error

HandleCollectSubnetsTask collects handles the task for collecting AWS Subnets.

func HandleCollectVPCsTask

func HandleCollectVPCsTask(ctx context.Context, t *asynq.Task) error

HandleCollectVPCsTask handles the task for collecting AWS VPCs.

func HandleLinkAllTask

func HandleLinkAllTask(ctx context.Context, _ *asynq.Task) error

HandleLinkAllTask is a handler, which establishes links between the various AWS models.

func LinkAvailabilityZoneWithRegion

func LinkAvailabilityZoneWithRegion(ctx context.Context, db *bun.DB) error

LinkAvailabilityZoneWithRegion creates links between the AWS AZs and Regions

func LinkImageWithRegion

func LinkImageWithRegion(ctx context.Context, db *bun.DB) error

LinkImageWithRegion creates links between the Image and Region.

func LinkInstanceWithImage

func LinkInstanceWithImage(ctx context.Context, db *bun.DB) error

LinkInstanceWithImage creates links between the Instance and Image.

func LinkInstanceWithRegion

func LinkInstanceWithRegion(ctx context.Context, db *bun.DB) error

LinkInstanceWithRegion creates links between the Instance and Region.

func LinkInstanceWithSubnet

func LinkInstanceWithSubnet(ctx context.Context, db *bun.DB) error

LinkInstanceWithSubnet creates links between the Instance and Subnet.

func LinkInstanceWithVPC

func LinkInstanceWithVPC(ctx context.Context, db *bun.DB) error

LinkInstanceWithVPC creates links between the AWS VPC and Instance.

func LinkLoadBalancerWithRegion

func LinkLoadBalancerWithRegion(ctx context.Context, db *bun.DB) error

LinkLoadBalancerWithRegion creates links between the LoadBalancer and Region.

func LinkLoadBalancerWithVpc

func LinkLoadBalancerWithVpc(ctx context.Context, db *bun.DB) error

LinkLoadBalancerWithVpc creates links between the LoadBalancer and VPC.

func LinkNetworkInterfaceWithInstance

func LinkNetworkInterfaceWithInstance(ctx context.Context, db *bun.DB) error

LinkNetworkInterfaceWithInstance creates links between models.Instance and models.NetworkInterface.

func LinkNetworkInterfaceWithLoadBalancer

func LinkNetworkInterfaceWithLoadBalancer(ctx context.Context, db *bun.DB) error

LinkNetworkInterfaceWithLoadBalancer creates links between models.NetworkInterface and models.LoadBalancer.

func LinkRegionWithVPC

func LinkRegionWithVPC(ctx context.Context, db *bun.DB) error

LinkRegionWithVPC creates links between the AWS Region and VPC

func LinkSubnetWithAZ

func LinkSubnetWithAZ(ctx context.Context, db *bun.DB) error

LinkSubnetWithAZ creates links between the AZ and Subnets.

func LinkSubnetWithVPC

func LinkSubnetWithVPC(ctx context.Context, db *bun.DB) error

LinkSubnetWithVPC creates links between the AWS Subnet and VPC

func NewCollectAvailabilityZonesTask

func NewCollectAvailabilityZonesTask() *asynq.Task

NewCollectAvailabilityZonesTask creates a new asynq.Task for collecting AWS Availability Zones without specifying a payload.

func NewCollectBucketsTask

func NewCollectBucketsTask() *asynq.Task

NewCollectBucketsTask creates a new asynq.Task for collecting S3 buckets, without specifying a payload.

func NewCollectDHCPOptionSetsTask added in v0.1.19

func NewCollectDHCPOptionSetsTask() *asynq.Task

NewCollectDHCPOptionSetsTask creates a new asynq.Task for collecting AWS DHCP option sets without specifying a payload.

func NewCollectDNSRecordsTask added in v0.1.19

func NewCollectDNSRecordsTask() *asynq.Task

NewCollectDNSRecordsTask creates a new asynq.Task for collecting AWS Route 53 DNS records, without specifying a payload.

func NewCollectHostedZonesTask added in v0.1.19

func NewCollectHostedZonesTask() *asynq.Task

NewCollectHostedZonesTask creates a new asynq.Task for collecting AWS Route 53 hosted zones, without specifying a payload.

func NewCollectImagesTask

func NewCollectImagesTask() *asynq.Task

NewCollectImagesTask creates a new asynq.Task for collecting AWS AMIs without specifying a payload.

func NewCollectInstancesTask

func NewCollectInstancesTask() *asynq.Task

NewCollectInstancesTask creates a new asynq.Task for collecting EC2 Instances, without specifying a payload.

func NewCollectLoadBalancersTask

func NewCollectLoadBalancersTask() *asynq.Task

NewCollectLoadBalancersTask creates a new asynq.Task for collecting AWS ELBs, without specifying a payload.

func NewCollectNetworkInterfacesTask

func NewCollectNetworkInterfacesTask() *asynq.Task

NewCollectNetworkInterfacesTask creates a new asynq.Task for collecting AWS ENIs, without specifying a payload.

func NewCollectRegionsTask

func NewCollectRegionsTask() *asynq.Task

NewCollectRegionsTask creates a new asynq.Task task for collecting AWS regions without specifying a payload.

func NewCollectSubnetsTask

func NewCollectSubnetsTask() *asynq.Task

NewCollectSubnetsTask creates a new asynq.Task for collecting AWS Subnets, without specifying a payload.

func NewCollectVPCsTask

func NewCollectVPCsTask() *asynq.Task

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.

Jump to

Keyboard shortcuts

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