storage

package
v10.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2019 License: Apache-2.0 Imports: 11 Imported by: 20

Documentation

Index

Constants

View Source
const (
	// DefaultBaseURL is the domain name used for storage requests in the
	// public cloud when a default client is created.
	DefaultBaseURL = storage.DefaultBaseURL

	// DefaultAPIVersion is the Azure Storage API version string used when a
	// basic client is created.
	DefaultAPIVersion = storage.DefaultAPIVersion
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountsClient

type AccountsClient interface {
	ListKeys(context context.Context, resourceGroup, accountName string) (storage.AccountListKeysResult, error)
	ListByResourceGroup(context context.Context, resourceGroup string) (storage.AccountListResult, error)
	AccountsClientAddons
}

AccountsClient is a minimal interface for azure AccountsClient

func NewAccountsClient

func NewAccountsClient(ctx context.Context, log *logrus.Entry, subscriptionID string, authorizer autorest.Authorizer) AccountsClient

NewAccountsClient returns a new AccountsClient

type AccountsClientAddons

type AccountsClientAddons interface {
	Create(ctx context.Context, resourceGroupName string, accountName string, parameters storage.AccountCreateParameters) error
}

type Blob

type Blob interface {
	CreateBlockBlobFromReader(blob io.Reader, options *storage.PutBlobOptions) error
	CreateBlockBlob(options *storage.PutBlobOptions) error
	PutBlock(blockID string, chunk []byte, options *storage.PutBlockOptions) error
	PutBlockList(blocks []storage.Block, options *storage.PutBlockListOptions) error
	Get(options *storage.GetBlobOptions) (io.ReadCloser, error)
	GetSASURI(options storage.BlobSASOptions) (string, error)
	Delete(options *storage.DeleteBlobOptions) error
	Exists() (bool, error)
}

Blob is a minimal interface for azure Blob

type BlobStorageClient

type BlobStorageClient interface {
	GetContainerReference(name string) Container
}

BlobStorageClient is a minimal interface for azure BlobStorageClient

type Client

type Client interface {
	GetBlobService() BlobStorageClient
}

Client is a minimal interface for azure Client

func NewClient

func NewClient(log *logrus.Entry, accountName, accountKey, serviceBaseURL, apiVersion string, useHTTPS bool) (Client, error)

NewClient returns a new Client

type Container

type Container interface {
	CreateIfNotExists(options *storage.CreateContainerOptions) (bool, error)
	GetBlobReference(name string) Blob
	Exists() (bool, error)
	ListBlobs(params storage.ListBlobsParameters) (storage.BlobListResponse, error)
}

Container is a minimal interface for azure Container

Jump to

Keyboard shortcuts

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