azure

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2024 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clients

type Clients struct {
	PublicIPAddressesClient PublicIPAddressesClient
	LoadBalancersClient     LoadBalancersClient
	VirtualMachinesClient   VirtualMachinesClient
}

Clients contains all needed Azure clients.

func NewClients

func NewClients(credentials *Credentials) (*Clients, error)

NewClients creates a new Clients instance using the given credentials.

type Credentials

type Credentials struct {
	ClientID       string `yaml:"aadClientId"`
	ClientSecret   string `yaml:"aadClientSecret"`
	TenantID       string `yaml:"tenantId"`
	SubscriptionID string `yaml:"subscriptionId"`
	ResourceGroup  string `yaml:"resourceGroup"`
}

Credentials contains credentials and other parameters needed to work with Azure objects.

func ReadConfig

func ReadConfig(path string) (*Credentials, error)

ReadConfig creates new Azure credentials by reading the configuration file at the given path.

type Future

type Future interface {
	// WaitForCompletionRef will return when one of the following conditions is met ...
	WaitForCompletionRef(context.Context, autorest.Client) error
}

Future contains the method WaitForCompletionRef.

type LoadBalancersClient

type LoadBalancersClient interface {
	// Get gets the specified load balancer.
	Get(context.Context, string, string, string) (network.LoadBalancer, error)
	// CreateOrUpdate creates or updates a load balancer.
	CreateOrUpdate(context.Context, string, string, network.LoadBalancer) (Future, error)
	// Client returns the autorest.Client
	Client() autorest.Client
}

LoadBalancersClient contains the methods of network.LoadBalancersClient.

type LoadBalancersClientImpl

type LoadBalancersClientImpl struct {
	network.LoadBalancersClient
}

LoadBalancersClientImpl is an implementation of LoadBalancersClient based on network.LoadBalancersClient.

func (LoadBalancersClientImpl) Client

Client implements LoadBalancersClient.

func (LoadBalancersClientImpl) CreateOrUpdate

func (c LoadBalancersClientImpl) CreateOrUpdate(ctx context.Context, resourceGroupName string, loadBalancerName string, loadBalancer network.LoadBalancer) (Future, error)

CreateOrUpdate implements LoadBalancersClient.

type PublicIPAddressesClient

type PublicIPAddressesClient interface {
	// Get gets the specified public IP address in a specified resource group.
	Get(context.Context, string, string, string) (network.PublicIPAddress, error)
	// List gets all public IP addresses in a resource group.
	List(context.Context, string) (network.PublicIPAddressListResultPage, error)
	// Delete deletes the specified public IP address.
	Delete(context.Context, string, string) (Future, error)
	// Client returns the autorest.Client
	Client() autorest.Client
}

PublicIPAddressesClient contains the methods of network.PublicIPAddressesClient.

type PublicIPAddressesClientImpl

type PublicIPAddressesClientImpl struct {
	network.PublicIPAddressesClient
}

PublicIPAddressesClientImpl is an implementation of PublicIPAddressesClient based on network.PublicIPAddressesClient.

func (PublicIPAddressesClientImpl) Client

Client implements PublicIPAddressesClient.

func (PublicIPAddressesClientImpl) Delete

func (c PublicIPAddressesClientImpl) Delete(ctx context.Context, resourceGroupName string, publicIPAddressName string) (Future, error)

Delete implements PublicIPAddressesClient.

type VirtualMachinesClient

type VirtualMachinesClient interface {
	// Get gets the specified virtual machine.
	Get(context.Context, string, string, compute.InstanceViewTypes) (compute.VirtualMachine, error)
	// Reapply reapplies the virtual machine's state.
	Reapply(context.Context, string, string) (Future, error)
	// Client returns the autorest.Client
	Client() autorest.Client
}

VirtualMachinesClient contains the methods of compute.VirtualMachinesClient.

type VirtualMachinesClientImpl

type VirtualMachinesClientImpl struct {
	compute.VirtualMachinesClient
}

VirtualMachinesClientImpl is an implementation of VirtualMachinesClient based on compute.VirtualMachinesClient.

func (VirtualMachinesClientImpl) Client

Client implements VirtualMachinesClient.

func (VirtualMachinesClientImpl) Reapply

func (c VirtualMachinesClientImpl) Reapply(ctx context.Context, resourceGroupName string, vmName string) (Future, error)

Reapply implements VirtualMachinesClient.

Jump to

Keyboard shortcuts

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