Documentation
¶
Index ¶
- Constants
- Variables
- func ClientNotFound(subscriptionID string) error
- func HandleCollectAllTask(ctx context.Context, _ *asynq.Task) error
- func HandleCollectBlobContainersTask(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 HandleCollectPublicAddressesTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectResourceGroupsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectStorageAccountsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectSubnetsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectSubscriptionsTask(ctx context.Context, _ *asynq.Task) error
- func HandleCollectUsersTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectVPCsTask(ctx context.Context, t *asynq.Task) error
- func HandleCollectVirtualMachinesTask(ctx context.Context, t *asynq.Task) error
- func HandleLinkAllTask(ctx context.Context, _ *asynq.Task) error
- func LinkBlobContainerWithResourceGroup(ctx context.Context, db *bun.DB) error
- func LinkLoadBalancerWithResourceGroup(ctx context.Context, db *bun.DB) error
- func LinkPublicAddressWithResourceGroup(ctx context.Context, db *bun.DB) error
- func LinkResourceGroupWithSubscription(ctx context.Context, db *bun.DB) error
- func LinkSubnetWithVPC(ctx context.Context, db *bun.DB) error
- func LinkVPCWithResourceGroup(ctx context.Context, db *bun.DB) error
- func LinkVirtualMachineWithResourceGroup(ctx context.Context, db *bun.DB) error
- func NewCollectBlobContainersTask() *asynq.Task
- func NewCollectLoadBalancersTask() *asynq.Task
- func NewCollectNetworkInterfacesTask() *asynq.Task
- func NewCollectPublicAddressesTask() *asynq.Task
- func NewCollectResourceGroupsTask() *asynq.Task
- func NewCollectStorageAccountsTask() *asynq.Task
- func NewCollectSubnetsTask() *asynq.Task
- func NewCollectSubscriptionsTask() *asynq.Task
- func NewCollectVPCsTask() *asynq.Task
- func NewCollectVirtualMachinesTask() *asynq.Task
- type CollectBlobContainersPayload
- type CollectLoadBalancersPayload
- type CollectNetworkInterfacesPayload
- type CollectPublicAddressesPayload
- type CollectResourceGroupsPayload
- type CollectStorageAccountsPayload
- type CollectSubnetsPayload
- type CollectUsersPayload
- type CollectVPCsPayload
- type CollectVirtualMachinesPayload
Constants ¶
const ( // TaskCollectAll is a meta task, which enqueues all relevant Azure tasks. TaskCollectAll = "az:task:collect-all" // TaskLinkAll is a task, which establishes links between Azure models. TaskLinkAll = "az:task:link-all" )
const TaskCollectBlobContainers = "az:task:collect-blob-containers"
TaskCollectBlobContainers is the name of the task for collecting Azure Blob containers.
const TaskCollectLoadBalancers = "az:task:collect-loadbalancers"
TaskCollectLoadBalancers is the name of the task for collecting Azure Load Balancers.
const TaskCollectNetworkInterfaces = "az:task:collect-network-interfaces"
TaskCollectNetworkInterfaces is the name of the task for collecting Azure Network Interfaces.
const TaskCollectPublicAddresses = "az:task:collect-public-addresses"
TaskCollectPublicAddresses is the name of the task for collecting Azure Public IP Addresses.
const TaskCollectResourceGroups = "az:task:collect-resource-groups"
TaskCollectResourceGroups is the name of the task for collecting Azure Resource Groups.
const TaskCollectStorageAccounts = "az:task:collect-storage-accounts"
TaskCollectStorageAccounts is the name of the task for collecting Azure Storage Accounts.
const TaskCollectSubnets = "az:task:collect-subnets"
TaskCollectSubnets is the name of the task for collecting Azure Subnets.
const TaskCollectSubscriptions = "az:task:collect-subscriptions"
TaskCollectSubscriptions is the name of the task for collecting Azure Subscriptions.
const TaskCollectUsers = "az:task:collect-users"
TaskCollectUsers is the name of the task for collecting Microsoft Entra user accounts.
const TaskCollectVPCs = "az:task:collect-vpcs"
TaskCollectVPCs is the name of the task for collecting Azure VPCs.
const TaskCollectVirtualMachines = "az:task:collect-vms"
TaskCollectVirtualMachines is the name of the task for collecting Azure Virtual Machines.
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 ErrNoPayload = errors.New("no payload specified")
ErrNoPayload is an error, which is returned by task handlers, which expect a payload, but none was provided.
var ErrNoResourceGroup = errors.New("no resource group specified")
ErrNoResourceGroup is an error, which is returned when a task expects an Azure Resource Group name, but none was provided.
var ErrNoStorageAccount = errors.New("no storage account specified")
ErrNoStorageAccount is an error, which is returned when a task expects an Azure Storage Account name, but none was provided.
var ErrNoSubscriptionID = errors.New("no subscription id specified")
ErrNoSubscriptionID is an error, which is returned when a task expects an Azure Subscription ID, but none was provided.
var ErrNoTenantID = errors.New("no tenant id specified")
ErrNoTenantID is an error, which is returned when a task expects an Azure Tenant ID, but none was provided.
var ErrNoUserPrincipalName = errors.New("no user principal name specified")
ErrNoUserPrincipalName is an error, which is returned by task handlers, which expect a user principal name to be specified, but none was provided.
var ErrNoVPC = errors.New("no vpc specified")
ErrNoVPC is an error, which is returned when a task expects an Azure VPC name, but none was provided.
Functions ¶
func ClientNotFound ¶
ClientNotFound wraps ErrClientNotFound with the given subscription id.
func HandleCollectAllTask ¶
HandleCollectAllTask is a handler, which enqueues tasks for collecting all Azure objects.
func HandleCollectBlobContainersTask ¶
HandleCollectBlobContainersTask is the handler, which collects Azure Blob containers.
func HandleCollectLoadBalancersTask ¶
HandleCollectLoadBalancersTask is the handler, which collects Azure Load Balancers.
func HandleCollectNetworkInterfacesTask ¶ added in v0.1.20
HandleCollectNetworkInterfacesTask is the handler, which collects Azure Network Interfaces.
func HandleCollectPublicAddressesTask ¶
HandleCollectPublicAddressesTask is the handler, which collects Azure Public IP Addresses.
func HandleCollectResourceGroupsTask ¶
HandleCollectResourceGroupsTask is the handler, which collects Azure Resource Groups.
func HandleCollectStorageAccountsTask ¶
HandleCollectStorageAccountsTask is the handler, which collects Azure Storage Accounts.
func HandleCollectSubnetsTask ¶
HandleCollectSubnetsTask is the handler, which collects Azure Subnets.
func HandleCollectSubscriptionsTask ¶
HandleCollectSubscriptionsTask is the handler, which collects Azure Subscriptions.
func HandleCollectUsersTask ¶ added in v0.1.14
HandleCollectUsersTask is the handler, which collects Microsoft Entra user accounts.
func HandleCollectVPCsTask ¶
HandleCollectVPCsTask is the handler, which collects Azure VPCs.
func HandleCollectVirtualMachinesTask ¶
HandleCollectVirtualMachinesTask is the handler, which collects Azure Virtual Machines.
func HandleLinkAllTask ¶
HandleLinkAllTask is a handler, which establishes links between the various Azure models.
func LinkBlobContainerWithResourceGroup ¶
LinkBlobContainerWithResourceGroup establishes relationships between the models.BlobContainer and models.ResourceGroup models.
func LinkLoadBalancerWithResourceGroup ¶
LinkLoadBalancerWithResourceGroup establishes relationships between the models.LoadBalancer and models.ResourceGroup models.
func LinkPublicAddressWithResourceGroup ¶
LinkPublicAddressWithResourceGroup establishes relationships between the models.PublicAddress and models.ResourceGroup models.
func LinkResourceGroupWithSubscription ¶
LinkResourceGroupWithSubscription creates links between the models.ResourceGroup and models.Subscription models.
func LinkSubnetWithVPC ¶
LinkSubnetWithVPC establishes relationships between the models.Subnet and models.VPC models.
func LinkVPCWithResourceGroup ¶
LinkVPCWithResourceGroup establishes relationships between the models.VPC and models.ResourceGroup models.
func LinkVirtualMachineWithResourceGroup ¶
LinkVirtualMachineWithResourceGroup creates links between the models.VirtualMachine and models.ResourceGroup models.
func NewCollectBlobContainersTask ¶
NewCollectBlobContainersTask creates a new asynq.Task for collecting Azure Blob containers without specifying a payload.
func NewCollectLoadBalancersTask ¶
NewCollectLoadBalancersTask creates a new asynq.Task for collecting Azure Load Balancers, without specifying a payload.
func NewCollectNetworkInterfacesTask ¶ added in v0.1.20
NewCollectNetworkInterfacesTask creates a new asynq.Task for collecting Azure Network Interfaces, without specifying a payload.
func NewCollectPublicAddressesTask ¶
NewCollectPublicAddressesTask creates a new asynq.Task for collecting Azure Public IP Addresses, without specifying a payload.
func NewCollectResourceGroupsTask ¶
NewCollectResourceGroupsTask creates a new asynq.Task for collecting Azure Resource Groups, without specifying a payload.
func NewCollectStorageAccountsTask ¶
NewCollectStorageAccountsTask creates a new asynq.Task for collecting Azure Storage Accounts without specifying a payload.
func NewCollectSubnetsTask ¶
NewCollectSubnetsTask creates a new asynq.Task for collecting Azure Subnets, without specifying a payload.
func NewCollectSubscriptionsTask ¶ added in v0.1.14
NewCollectSubscriptionsTask creates a new asynq.Task for collecting Azure Subscriptions, without specifying a payload.
func NewCollectVPCsTask ¶
NewCollectVPCsTask creates a new asynq.Task for collecting Azure VPCs without specifying a payload.
func NewCollectVirtualMachinesTask ¶
NewCollectVirtualMachinesTask creates a new asynq.Task for collecting Azure Virtual Machines, without specifying a payload.
Types ¶
type CollectBlobContainersPayload ¶
type CollectBlobContainersPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
// StorageAccount specifies from which storage account to collect.
StorageAccount string `json:"storage_account" yaml:"storage_account"`
}
CollectBlobContainersPayload is the payload used for collecting Azure Blob containers.
type CollectLoadBalancersPayload ¶
type CollectLoadBalancersPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
}
CollectLoadBalancersPayload is the payload used for collecting Azure Load Balancers.
type CollectNetworkInterfacesPayload ¶ added in v0.1.20
type CollectNetworkInterfacesPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
}
CollectNetworkInterfacesPayload is the payload used for collecting Azure Network Interfaces.
type CollectPublicAddressesPayload ¶
type CollectPublicAddressesPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
}
CollectPublicAddressesPayload is the payload used for collecting Azure Public IP Addresses.
type CollectResourceGroupsPayload ¶
type CollectResourceGroupsPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
}
CollectResourceGroupsPayload is the payload used for collecting Azure Resource Groups.
type CollectStorageAccountsPayload ¶
type CollectStorageAccountsPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
}
CollectStorageAccountsPayload is the payload used for collecting Azure Storage Accounts.
type CollectSubnetsPayload ¶
type CollectSubnetsPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
// VPCName specifies from which VPC to collect.
VPCName string `json:"vpc_name" yaml:"vpc_name"`
}
CollectSubnetsPayload is the payload used for collecting Azure Subnets.
type CollectUsersPayload ¶ added in v0.1.13
type CollectUsersPayload struct {
// TenantID specifies the Azure Tenant ID from which to
// collect.
TenantID string `json:"tenant_id" yaml:"tenant_id"`
// UserPrincipalName specifies the principal name of the user to be
// collected.
UserPrincipalName string `json:"user_principal_name" yaml:"user_principal_name"`
}
CollectUsersPayload is the payload used for collecting Microsoft Entra user accounts.
type CollectVPCsPayload ¶
type CollectVPCsPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
}
CollectVPCsPayload is the payload used for collecting Azure VPCs.
type CollectVirtualMachinesPayload ¶
type CollectVirtualMachinesPayload struct {
// SubscriptionID specifies the Azure Subscription ID from which to
// collect.
SubscriptionID string `json:"subscription_id" yaml:"subscription_id"`
// ResourceGroup specifies from which resource group to collect.
ResourceGroup string `json:"resource_group" yaml:"resource_group"`
}
CollectVirtualMachinesPayload is the payload used for collecting Azure Virtual Machines.