client

package
v1.25.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAzureAPINotFoundError added in v1.18.0

func IsAzureAPINotFoundError(err error) bool

IsAzureAPINotFoundError tries to determine if an error is a resource not found error.

Types

type AzureFactory added in v1.15.0

type AzureFactory struct {
	// contains filtered or unexported fields
}

AzureFactory is an implementation of Factory to produce clients for various Azure services.

func (AzureFactory) DNSRecordSet added in v1.21.0

func (f AzureFactory) DNSRecordSet(ctx context.Context, secretRef corev1.SecretReference) (DNSRecordSet, error)

DNSRecordSet reads the secret from the passed reference and return an Azure DNS record set client.

func (AzureFactory) DNSZone added in v1.21.0

func (f AzureFactory) DNSZone(ctx context.Context, secretRef corev1.SecretReference) (DNSZone, error)

DNSZone reads the secret from the passed reference and return an Azure DNS zone client.

func (AzureFactory) Group added in v1.15.0

func (f AzureFactory) Group(ctx context.Context, secretRef corev1.SecretReference) (Group, error)

Group reads the secret from the passed reference and return an Azure resource group client.

func (AzureFactory) Storage added in v1.15.0

func (f AzureFactory) Storage(ctx context.Context, secretRef corev1.SecretReference) (Storage, error)

Storage reads the secret from the passed reference and return an Azure (blob) storage client.

func (AzureFactory) StorageAccount added in v1.15.0

func (f AzureFactory) StorageAccount(ctx context.Context, secretRef corev1.SecretReference) (StorageAccount, error)

StorageAccount reads the secret from the passed reference and return an Azure storage account client.

func (AzureFactory) Vmss added in v1.18.0

func (f AzureFactory) Vmss(ctx context.Context, secretRef corev1.SecretReference) (Vmss, error)

Vmss reads the secret from the passed reference and return an Azure virtual machine scale set client.

type DNSRecordSet added in v1.21.0

type DNSRecordSet interface {
	CreateOrUpdate(context.Context, string, string, string, []string, int64) error
	Delete(context.Context, string, string, string) error
}

DNSRecordSet represents an Azure DNS recordset client.

type DNSRecordSetClient added in v1.21.0

type DNSRecordSetClient struct {
	// contains filtered or unexported fields
}

DNSRecordSetClient is an implementation of DNSRecordSet for a DNS recordset client.

func (DNSRecordSetClient) CreateOrUpdate added in v1.21.0

func (c DNSRecordSetClient) CreateOrUpdate(ctx context.Context, zoneID string, name string, recordType string, values []string, ttl int64) error

CreateOrUpdate creates or updates the recordset with the given name, record type, values, and TTL in the zone with the given zone ID.

func (DNSRecordSetClient) Delete added in v1.21.0

func (c DNSRecordSetClient) Delete(ctx context.Context, zoneID string, name string, recordType string) error

Delete deletes the recordset with the given name and record type in the zone with the given zone ID.

type DNSZone added in v1.21.0

type DNSZone interface {
	GetAll(context.Context) (map[string]string, error)
}

DNSZone represents an Azure DNS zone client.

type DNSZoneClient added in v1.21.0

type DNSZoneClient struct {
	// contains filtered or unexported fields
}

DNSZoneClient is an implementation of DNSZone for a DNS zone client.

func (DNSZoneClient) GetAll added in v1.21.0

func (c DNSZoneClient) GetAll(ctx context.Context) (map[string]string, error)

GetAll returns a map of all zone names mapped to their IDs.

type Factory added in v1.15.0

Factory represents a factory to produce clients for various Azure services.

func NewAzureClientFactory added in v1.15.0

func NewAzureClientFactory(client client.Client) Factory

NewAzureClientFactory returns a new factory to produce clients for various Azure services.

type Group added in v1.15.0

type Group interface {
	CreateOrUpdate(context.Context, string, string) error
	DeleteIfExits(context.Context, string) error
}

Group represents an Azure group client.

type GroupClient added in v1.15.0

type GroupClient struct {
	// contains filtered or unexported fields
}

GroupClient is an implementation of Group for a resource group client.

func (GroupClient) CreateOrUpdate added in v1.15.0

func (c GroupClient) CreateOrUpdate(ctx context.Context, resourceGroupName, region string) error

CreateOrUpdate creates a resource group or update an existing resource group.

func (GroupClient) DeleteIfExits added in v1.15.0

func (c GroupClient) DeleteIfExits(ctx context.Context, resourceGroupName string) error

DeleteIfExits deletes a resource group if it exits.

type Storage

type Storage interface {
	DeleteObjectsWithPrefix(context.Context, string, string) error
	CreateContainerIfNotExists(context.Context, string) error
	DeleteContainerIfExists(context.Context, string) error
}

Storage represents an Azure (blob) storage client.

type StorageAccount added in v1.15.0

type StorageAccount interface {
	CreateStorageAccount(context.Context, string, string, string) error
	ListStorageAccountKey(context.Context, string, string) (string, error)
}

StorageAccount represents an Azure storage account client.

type StorageAccountClient added in v1.15.0

type StorageAccountClient struct {
	// contains filtered or unexported fields
}

StorageAccountClient is an implementation of StorageAccount for storage account client.

func (StorageAccountClient) CreateStorageAccount added in v1.15.0

func (c StorageAccountClient) CreateStorageAccount(ctx context.Context, resourceGroupName, storageAccountName, region string) error

CreateStorageAccount creates a storage account.

func (StorageAccountClient) ListStorageAccountKey added in v1.15.0

func (c StorageAccountClient) ListStorageAccountKey(ctx context.Context, resourceGroupName, storageAccountName string) (string, error)

ListStorageAccountKey lists the first key of a storage account.

type StorageClient

type StorageClient struct {
	// contains filtered or unexported fields
}

StorageClient is an implementation of Storage for a (blob) storage client.

func (StorageClient) CreateContainerIfNotExists

func (c StorageClient) CreateContainerIfNotExists(ctx context.Context, container string) error

CreateContainerIfNotExists creates the azure blob container with name <container>. If it already exist,no error is returned.

func (StorageClient) DeleteContainerIfExists

func (c StorageClient) DeleteContainerIfExists(ctx context.Context, container string) error

DeleteContainerIfExists deletes the azure blob container with name <container>. If it does not exist, no error is returned.

func (StorageClient) DeleteObjectsWithPrefix

func (c StorageClient) DeleteObjectsWithPrefix(ctx context.Context, container, prefix string) error

DeleteObjectsWithPrefix deletes the blob objects with the specific <prefix> from <container>. If it does not exist, no error is returned.

type Vmss added in v1.18.0

Vmss represents an Azure virtual machine scale set client.

type VmssClient added in v1.18.0

type VmssClient struct {
	// contains filtered or unexported fields
}

VmssClient is an implementation of Vmss for a virtual machine scale set client.

func (VmssClient) Create added in v1.18.0

func (c VmssClient) Create(ctx context.Context, resourceGroupName, name string, properties *compute.VirtualMachineScaleSet) (*compute.VirtualMachineScaleSet, error)

Create will create a vmss.

func (VmssClient) Delete added in v1.18.0

func (c VmssClient) Delete(ctx context.Context, resourceGroupName, name string) error

Delete will delete a vmss.

func (VmssClient) Get added in v1.18.0

func (c VmssClient) Get(ctx context.Context, resourceGroupName, name string) (*compute.VirtualMachineScaleSet, error)

Get will fetch a vmss.

func (VmssClient) List added in v1.18.0

func (c VmssClient) List(ctx context.Context, resourceGroupName string) ([]compute.VirtualMachineScaleSet, error)

List will list vmss in a resource group.

Directories

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

Jump to

Keyboard shortcuts

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