client

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0, MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage represents a Openstack swift storage client.

type StorageClient

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

StorageClient represents a Azure storage client.

func NewStorageClientFromSecretRef

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

NewStorageClientFromSecretRef retrieves the openstack client from specified by the secret reference.

func (*StorageClient) CreateContainerIfNotExists

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

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

func (*StorageClient) DeleteContainerIfExists

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

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

func (*StorageClient) DeleteObjectsWithPrefix

func (s *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.

Jump to

Keyboard shortcuts

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