azure

package
v0.0.0-...-b25b198 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package azure defines client to connect to Azure cloud

Index

Constants

View Source
const (
	// ChinaCloud defines China cloud
	ChinaCloud = "AzureChinaCloud"
	// GermanCloud defines German cloud
	GermanCloud = "AzureGermanCloud"
	// PublicCloud defines Public cloud
	PublicCloud = "AzurePublicCloud"
	// USGovernmentCloud defines US Government cloud
	USGovernmentCloud = "AzureUSGovernmentCloud"
)
View Source
const (
	// ResourceTypeVirtualMachine defines virtualMachines resource type
	ResourceTypeVirtualMachine = "virtualMachines"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	VerifyAccount(ctx context.Context) error
	ListResourceGroups(ctx context.Context, location string) ([]*models.AzureResourceGroup, error)
	ListVirtualNetworks(ctx context.Context, resourceGroup string, location string) ([]*models.AzureVirtualNetwork, error)
	CreateResourceGroup(ctx context.Context, resourceGroupName string, location string) error
	CreateVirtualNetwork(ctx context.Context, resourceGroupName string, virtualNetworkName string, cidrBlock string, location string) error
	GetAzureRegions(ctx context.Context) ([]*models.AzureLocation, error)
	GetAzureInstanceTypesForRegion(ctx context.Context, region string) ([]*models.AzureInstanceType, error)
}

Client defines methods to access Azure inventory

func New

func New(creds *Credentials) (Client, error)

New creates an Azure client

type Credentials

type Credentials struct {
	SubscriptionID string
	ClientID       string
	ClientSecret   string
	TenantID       string
	AzureCloud     string
}

Credentials defines azure credentials

Directories

Path Synopsis
Package azure is a generated GoMock package.
Package azure is a generated GoMock package.

Jump to

Keyboard shortcuts

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