Documentation
¶
Index ¶
- Constants
- Variables
- func ClientNotFound(projectID string) error
- func HandleCollectAddressesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectAllTask(ctx context.Context, _ *asynq.Task) error
- func HandleCollectBucketsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectDisksTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectForwardingRules(ctx context.Context, t *asynq.Task) error
- func HandleCollectGKEClusters(ctx context.Context, t *asynq.Task) error
- func HandleCollectIAMPoliciesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectInstancesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectProjectsTask(ctx context.Context, _ *asynq.Task) error
- func HandleCollectSubnetsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectTargetPools(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 LinkAddressWithProject(ctx context.Context, db *bun.DB) error
- func LinkForwardingRuleWithProject(ctx context.Context, db *bun.DB) error
- func LinkGKEClusterWithProject(ctx context.Context, db *bun.DB) error
- func LinkInstanceWithDisk(ctx context.Context, db *bun.DB) error
- func LinkInstanceWithNetworkInterface(ctx context.Context, db *bun.DB) error
- func LinkInstanceWithProject(ctx context.Context, db *bun.DB) error
- func LinkSubnetWithProject(ctx context.Context, db *bun.DB) error
- func LinkSubnetWithVPC(ctx context.Context, db *bun.DB) error
- func LinkTargetPoolWithInstance(ctx context.Context, db *bun.DB) error
- func LinkTargetPoolWithProject(ctx context.Context, db *bun.DB) error
- func LinkVPCWithProject(ctx context.Context, db *bun.DB) error
- func NewCollectAddressesTask() *asynq.Task
- func NewCollectBucketsTask() *asynq.Task
- func NewCollectDisksTask() *asynq.Task
- func NewCollectForwardingRulesTask() *asynq.Task
- func NewCollectGKEClustersTask() *asynq.Task
- func NewCollectIAMPoliciesTask() *asynq.Task
- func NewCollectInstancesTask() *asynq.Task
- func NewCollectProjectsTask() *asynq.Task
- func NewCollectSubnetsTask() *asynq.Task
- func NewCollectTargetPoolsTask() *asynq.Task
- func NewCollectVPCsTask() *asynq.Task
- type CollectAddressesPayload
- type CollectBucketsPayload
- type CollectDisksPayload
- type CollectForwardingRulesPayload
- type CollectGKEClustersPayload
- type CollectIAMPoliciesPayload
- type CollectInstancesPayload
- type CollectSubnetsPayload
- type CollectTargetPoolsPayload
- type CollectVPCsPayload
Constants ¶
const ( // TaskCollectIAMPolicies is the name of the task for collecting GCP IAM Policies. TaskCollectIAMPolicies = "gcp:task:collect-iam-policies" // ResourceTypeProject represents a resource of type project in the IAMPolicy model. // alternatives are 'organisation' and 'folder', which are currently not used. ResourceTypeProject = "project" )
const ( // TaskCollectAll is a meta task, which enqueues all relevant GCP tasks. TaskCollectAll = "gcp:task:collect-all" // TaskLinkAll is a task, which establishes links between GCP models. TaskLinkAll = "gcp:task:link-all" )
const TaskCollectAddresses = "gcp:task:collect-addresses"
TaskCollectAddresses is the name of the task for collecting global and regional static IP addresses.
const ( // TaskCollectBuckets is the name of the task for collecting GCP // Buckets. TaskCollectBuckets = "gcp:task:collect-buckets" )
const ( // TaskCollectDisks is the name of the task for collecting GCP // disks. TaskCollectDisks = "gcp:task:collect-disks" )
const TaskCollectForwardingRules = "gcp:task:collect-forwarding-rules"
TaskCollectForwardingRules is the name of the task for collecting GCP Forwarding Rules.
For more information about Forwarding Rules, please refer to the Forwarding Rules overview documentation.
const TaskCollectGKEClusters = "gcp:task:collect-gke-clusters"
TaskCollectGKEClusters is the name of the task for collecting GKE clusters.
const TaskCollectInstances = "gcp:task:collect-instances"
TaskCollectInstances is the name of the task for collecting GCP Instances
const TaskCollectProjects = "gcp:task:collect-projects"
TaskCollectProjects is the name of the task for collecting GCP Projects
const ( // TaskCollectSubnets is the name of the task for collecting GCP // subnets. TaskCollectSubnets = "gcp:task:collect-subnets" )
const TaskCollectTargetPools = "gcp:task:collect-target-pools"
TaskCollectTargetPools is the name of the task for collecting GCP Target Pools.
For more information about Target Pools, please refer to the Target Pools documentation.
const ( // TaskCollectVPCs is the name of the task for collecting GCP // VPCs. TaskCollectVPCs = "gcp:task:collect-vpcs" )
Variables ¶
var ErrClientNotFound = errors.New("client not found")
ErrClientNotFound is an error, which is returned when an API client was not found in the clientset registries.
var ErrNoProjectID = errors.New("no project id specified")
ErrNoProjectID is an error, which is returned when a task expects a project id to be sent as part of the payload, but none was provided.
var ErrNoSourceImage = errors.New("no source image found")
ErrNoSourceImage is an error returned when a source image was not found for an instance.
Functions ¶
func ClientNotFound ¶
ClientNotFound wraps ErrClientNotFound with the given project id.
func HandleCollectAddressesTask ¶
HandleCollectAddressesTask is the handler, which collects static global and regional IP addresses.
func HandleCollectAllTask ¶
HandleCollectAllTask is a handler, which enqueues tasks for collecting all GCP objects.
func HandleCollectBucketsTask ¶
HandleCollectBucketsTask is the handler, which collects GCP Buckets.
func HandleCollectDisksTask ¶ added in v0.1.1
HandleCollectDisksTask is the handler, which collects GCP disks.
func HandleCollectForwardingRules ¶
HandleCollectForwardingRules is the handler, which collects GCP Forwarding Rules.
func HandleCollectGKEClusters ¶ added in v0.1.2
HandleCollectGKEClusters is the handler, which collects GKE Clusters.
func HandleCollectIAMPoliciesTask ¶ added in v0.1.19
HandleCollectIAMPoliciesTask is the handler, which collects GCP IAM Policies.
func HandleCollectInstancesTask ¶
HandleCollectInstancesTask is the handler, which collects GCP Instances.
func HandleCollectProjectsTask ¶
HandleCollectProjectsTask is the handler, which collects GCP projects
func HandleCollectSubnetsTask ¶
HandleCollectSubnetsTask is the handler, which collects GCP subnets.
func HandleCollectTargetPools ¶ added in v0.1.6
HandleCollectTargetPools is the handler, which collects GCP Target Pools.
func HandleCollectVPCsTask ¶
HandleCollectVPCsTask is the handler, which collects GCP VPCs.
func HandleLinkAllTask ¶
HandleLinkAllTask is a handler, which establishes links between the various GCP models.
func LinkAddressWithProject ¶
LinkAddressWithProject creates links between the models.Address and models.Project models.
func LinkForwardingRuleWithProject ¶
LinkForwardingRuleWithProject creates links between the models.ForwardingRule and models.Project models.
func LinkGKEClusterWithProject ¶ added in v0.1.2
LinkGKEClusterWithProject creates links between the models.GKECluster and models.Project models.
func LinkInstanceWithDisk ¶ added in v0.1.1
LinkInstanceWithDisk creates links between the models.Instance and models.Disk models.
func LinkInstanceWithNetworkInterface ¶
LinkInstanceWithNetworkInterface creates links between the models.NetworkInterface and models.Instance models.
func LinkInstanceWithProject ¶
LinkInstanceWithProject creates links between the models.Instance and models.Project models.
func LinkSubnetWithProject ¶
LinkSubnetWithProject creates links between the models.Subnet and models.Project models.
func LinkSubnetWithVPC ¶
LinkSubnetWithVPC creates links between the models.Subnet and models.VPC models.
func LinkTargetPoolWithInstance ¶ added in v0.1.6
LinkTargetPoolWithInstance creates links between the models.TargetPool and models.TargetPoolInstance models.
func LinkTargetPoolWithProject ¶ added in v0.1.6
LinkTargetPoolWithProject creates links between the models.TargetPool and models.Project models.
func LinkVPCWithProject ¶
LinkVPCWithProject creates links between the models.VPC and models.Project models.
func NewCollectAddressesTask ¶
NewCollectAddressesTask creates a new asynq.Task for collecting global and regional static IP addresses, without specifying a payload.
func NewCollectBucketsTask ¶
NewCollectBucketsTask creates a new asynq.Task task for collecting GCP Buckets without specifying a payload.
func NewCollectDisksTask ¶ added in v0.1.1
NewCollectDisksTask creates a new asynq.Task task for collecting GCP disks without specifying a payload.
func NewCollectForwardingRulesTask ¶
NewCollectForwardingRulesTask creates a new asynq.Task for collecting GCP Forwarding Rules, without specifying a payload.
func NewCollectGKEClustersTask ¶ added in v0.1.2
NewCollectGKEClustersTask creates a new asynq.Task for collecting GKE Clusters, without specifying a payload.
func NewCollectIAMPoliciesTask ¶ added in v0.1.19
NewCollectIAMPoliciesTask creates a new asynq.Task task for collecting GCP IAM Policies without specifying a payload.
func NewCollectInstancesTask ¶
NewCollectInstancesTask creates a new asynq.Task for collecting GCP Compute Engine Instances, without specifying a payload.
func NewCollectProjectsTask ¶
NewCollectProjectsTask creates a new asynq.Task for collecting GCP Projects, without specifying a payload.
func NewCollectSubnetsTask ¶
NewCollectSubnetsTask creates a new asynq.Task task for collecting GCP subnets without specifying a payload.
func NewCollectTargetPoolsTask ¶ added in v0.1.6
NewCollectTargetPoolsTask creates a new asynq.Task for collecting GCP Target Pools, without specifying a payload.
func NewCollectVPCsTask ¶
NewCollectVPCsTask creates a new asynq.Task task for collecting GCP VPCs without specifying a payload.
Types ¶
type CollectAddressesPayload ¶
type CollectAddressesPayload struct {
// ProjectID specifies the globally unique project id from which to
// collect.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectAddressesPayload is the payload used for collecting global and regional static IP addresses.
type CollectBucketsPayload ¶
type CollectBucketsPayload struct {
// ProjectID specifies the GCP project ID, which is associated with a
// registered client.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectBucketsPayload is the payload, which is used to collect GCP Buckets.
type CollectDisksPayload ¶ added in v0.1.1
type CollectDisksPayload struct {
// ProjectID specifies the GCP project ID, which is associated with a
// registered client.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectDisksPayload is the payload, which is used to collect GCP disks.
type CollectForwardingRulesPayload ¶
type CollectForwardingRulesPayload struct {
// ProjectID specifies the globally unique project id from which to
// collect GCP Forwarding Rules.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectForwardingRulesPayload is the payload used for collecting GCP Forwarding Rules for a given project.
type CollectGKEClustersPayload ¶ added in v0.1.2
type CollectGKEClustersPayload struct {
// ProjectID specifies the globally unique project id from which to
// collect.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectGKEClustersPayload is the payload used for collecting GKE Clusters.
type CollectIAMPoliciesPayload ¶ added in v0.1.19
type CollectIAMPoliciesPayload struct {
// ProjectID specifies the GCP project ID, which is associated with a
// registered client.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectIAMPoliciesPayload is the payload, which is used to collect GCP IAM Policies.
type CollectInstancesPayload ¶
type CollectInstancesPayload struct {
// ProjectID specifies the globally unique project id from which to
// collect GCP Compute Engine Instances.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectInstancesPayload is the payload used for collecting GCP Instances from a given GCP Project.
type CollectSubnetsPayload ¶
type CollectSubnetsPayload struct {
// ProjectID specifies the GCP project ID, which is associated with a
// registered client.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectSubnetsPayload is the payload, which is used to collect GCP subnets.
type CollectTargetPoolsPayload ¶ added in v0.1.6
type CollectTargetPoolsPayload struct {
// ProjectID specifies the globally unique project id from which to
// collect resources.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectTargetPoolsPayload is the payload used for collecting GCP Target Pools for a given project.
type CollectVPCsPayload ¶
type CollectVPCsPayload struct {
// ProjectID specifies the GCP project ID, which is associated with a
// registered client.
ProjectID string `json:"project_id" yaml:"project_id"`
}
CollectVPCsPayload is the payload, which is used to collect GCP VPCs.