client

package
v0.0.0-...-d68cec5 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2019 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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 *internal.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>.

Jump to

Keyboard shortcuts

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