Documentation ¶
Index ¶
- func IsNotFoundError(err error) bool
- func NewStorageAccountClient(data []byte) (*storage.AccountsClient, error)
- type AccountHandle
- func (a *AccountHandle) Create(ctx context.Context, params storage.AccountCreateParameters) (*storage.Account, error)
- func (a *AccountHandle) Delete(ctx context.Context) error
- func (a *AccountHandle) Get(ctx context.Context) (*storage.Account, error)
- func (a *AccountHandle) IsAccountNameAvailable(ctx context.Context, name string) error
- func (a *AccountHandle) ListKeys(ctx context.Context) ([]storage.AccountKey, error)
- func (a *AccountHandle) Update(ctx context.Context, params storage.AccountUpdateParameters) (*storage.Account, error)
- type AccountOperations
- type ContainerHandle
- func (a *ContainerHandle) Create(ctx context.Context, publicAccessType azblob.PublicAccessType, ...) error
- func (a *ContainerHandle) Delete(ctx context.Context) error
- func (a *ContainerHandle) Get(ctx context.Context) (*azblob.PublicAccessType, azblob.Metadata, error)
- func (a *ContainerHandle) Update(ctx context.Context, publicAccessType azblob.PublicAccessType, ...) error
- type ContainerOperations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFoundError ¶
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 ¶
func (a *AccountHandle) Create(ctx context.Context, params storage.AccountCreateParameters) (*storage.Account, error)
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) 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 ¶
func (a *AccountHandle) Update(ctx context.Context, params storage.AccountUpdateParameters) (*storage.Account, error)
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 ¶
func (a *ContainerHandle) Get(ctx context.Context) (*azblob.PublicAccessType, azblob.Metadata, error)
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