storage

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFoundError

func IsNotFoundError(err error) bool

IsNotFoundError tests for azblob not found error

func NewStorageAccountClient

func NewStorageAccountClient(data []byte) (*storage.AccountsClient, error)

NewStorageAccountClient create Azure storage.AccountClient using provided credentials data

Types

type AccountHandle

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

AccountHandle implements AccountOperations interface

func NewAccountHandle

func NewAccountHandle(client *storage.AccountsClient, groupName, accountName string) *AccountHandle

NewAccountHandle creates a new storage account with specific name,

func (*AccountHandle) Create

Create create new storage account with given location

func (*AccountHandle) Delete

func (a *AccountHandle) Delete(ctx context.Context) error

Delete deletes storage account resource

func (*AccountHandle) Get

Get retrieves storage account resource

func (*AccountHandle) IsAccountNameAvailable

func (a *AccountHandle) IsAccountNameAvailable(ctx context.Context, name string) error

IsAccountNameAvailable checks if AccountHandle name is not being used (Azure requires unique storage account names)

func (*AccountHandle) ListKeys

func (a *AccountHandle) ListKeys(ctx context.Context) ([]storage.AccountKey, error)

ListKeys for this storage account

func (*AccountHandle) Update

Update create new storage account with given location

type AccountOperations

type AccountOperations interface {
	Create(context.Context, storage.AccountCreateParameters) (*storage.Account, error)
	Update(context.Context, storage.AccountUpdateParameters) (*storage.Account, error)
	Get(ctx context.Context) (*storage.Account, error)
	Delete(ctx context.Context) error
	IsAccountNameAvailable(context.Context, string) error
	ListKeys(context.Context) ([]storage.AccountKey, error)
}

AccountOperations Azure storate account interface

type ContainerHandle

type ContainerHandle struct {
	azblob.ContainerURL
	PublicAccessType azblob.PublicAccessType
}

ContainerHandle implements ContainerOperations

func NewContainerHandle

func NewContainerHandle(accountName, accountKey, containerName string) (*ContainerHandle, error)

NewContainerHandle creates a new instance of ContainerHandle for given storage account and given container name

func (*ContainerHandle) Create

func (a *ContainerHandle) Create(ctx context.Context, publicAccessType azblob.PublicAccessType, metadata azblob.Metadata) error

Create container resource

func (*ContainerHandle) Delete

func (a *ContainerHandle) Delete(ctx context.Context) error

Delete deletes the named container.

func (*ContainerHandle) Get

Get resource information

func (*ContainerHandle) Update

func (a *ContainerHandle) Update(ctx context.Context, publicAccessType azblob.PublicAccessType, metadata azblob.Metadata) error

Update container resource

type ContainerOperations

type ContainerOperations interface {
	Create(ctx context.Context, publicAccessType azblob.PublicAccessType, metadata azblob.Metadata) error
	Update(ctx context.Context, publicAccessType azblob.PublicAccessType, metadata azblob.Metadata) error
	Get(ctx context.Context) (*azblob.PublicAccessType, azblob.Metadata, error)
	Delete(ctx context.Context) error
}

ContainerOperations interface to perform operations on Container resources

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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