azureclient

package
Version: v1.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	ListResourceSKUs(ctx context.Context, filter string) (ResourceSKUsPage, error)

	// Zones
	CreateOrUpdateZone(ctx context.Context, resourceGroupName string, zone string) (dns.Zone, error)
	DeleteZone(ctx context.Context, resourceGroupName string, zone string) error
	GetZone(ctx context.Context, resourceGroupName string, zone string) (dns.Zone, error)

	// RecordSets
	ListRecordSetsByZone(ctx context.Context, resourceGroupName string, zone string, suffix string) (RecordSetPage, error)
	CreateOrUpdateRecordSet(ctx context.Context, resourceGroupName string, zone string, recordSetName string, recordType dns.RecordType, recordSet dns.RecordSet) (dns.RecordSet, error)
	DeleteRecordSet(ctx context.Context, resourceGroupName string, zone string, recordSetName string, recordType dns.RecordType) error

	// Virtual Machines
	ListAllVirtualMachines(ctx context.Context, statusOnly string) (compute.VirtualMachineListResultPage, error)
	DeallocateVirtualMachine(ctx context.Context, resourceGroup, name string) (compute.VirtualMachinesDeallocateFuture, error)
	StartVirtualMachine(ctx context.Context, resourceGroup, name string) (compute.VirtualMachinesStartFuture, error)
}

Client is a wrapper object for actual Azure libraries to allow for easier mocking/testing.

func NewClient added in v1.0.10

func NewClient(creds []byte) (Client, error)

NewClient creates our client wrapper object for interacting with Azure using the Azure creds provided.

func NewClientFromFile added in v1.0.5

func NewClientFromFile(filename string) (Client, error)

NewClientFromFile creates our client wrapper object for interacting with Azure. The Azure creds are read from the specified file.

func NewClientFromSecret

func NewClientFromSecret(secret *corev1.Secret) (Client, error)

NewClientFromSecret creates our client wrapper object for interacting with Azure. The Azure creds are read from the specified secret.

type RecordSetPage added in v1.0.5

type RecordSetPage interface {
	NextWithContext(ctx context.Context) error
	NotDone() bool
	Values() []dns.RecordSet
}

RecordSetPage is a page of results from listing record sets.

type ResourceSKUsPage

type ResourceSKUsPage interface {
	NextWithContext(ctx context.Context) error
	NotDone() bool
	Values() []compute.ResourceSku
}

ResourceSKUsPage is a page of results from listing resource SKUs.

Source Files

Directories

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL