client

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2021 License: Apache-2.0, MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComputeClient added in v1.19.0

type ComputeClient interface {
	// GetExternalAddresses returns a list of all external IP addresses mapped to the names of their users.
	GetExternalAddresses(ctx context.Context, region string) (map[string][]string, error)
}

ComputeClient is an interface which must be implemented by GCP compute clients.

func NewComputeClientFromSecretRef added in v1.19.0

func NewComputeClientFromSecretRef(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (ComputeClient, error)

NewComputeClientFromSecretRef creates a new compute client from the given client and secret reference.

type DNSClient added in v1.18.0

type DNSClient interface {
	GetManagedZones(ctx context.Context) (map[string]string, error)
	CreateOrUpdateRecordSet(ctx context.Context, managedZone, name, recordType string, rrdatas []string, ttl int64) error
	DeleteRecordSet(ctx context.Context, managedZone, name, recordType string) error
}

DNSClient is an interface which must be implemented by GCP DNS clients.

func NewDNSClientFromSecretRef added in v1.18.0

func NewDNSClientFromSecretRef(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (DNSClient, error)

NewDNSClientFromSecretRef creates a new DNS client from the given client and secret reference.

type Factory added in v1.18.0

Factory is a factory that can produce clients for various GCP Services.

func NewFactory added in v1.18.0

func NewFactory() Factory

NewFactory returns a new factory to produce clients for various GCP services.

type StorageClient

type StorageClient interface {
	// GCS wrappers
	CreateBucketIfNotExists(ctx context.Context, bucketName, region string) error
	DeleteBucketIfExists(ctx context.Context, bucketName string) error
	DeleteObjectsWithPrefix(ctx context.Context, bucketName, prefix string) error
}

StorageClient is an interface which must be implemented by GCS clients.

func NewStorageClient

func NewStorageClient(ctx context.Context, serviceAccount *gcp.ServiceAccount) (StorageClient, error)

NewStorageClient creates a new storage client from the given serviceAccount.

func NewStorageClientFromSecretRef

func NewStorageClientFromSecretRef(ctx context.Context, c client.Client, secretRef corev1.SecretReference) (StorageClient, error)

NewStorageClientFromSecretRef creates a new storage client from the given <secretRef>.

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