Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob interface {
	// Name returns the name of the blob.
	Name() string

	// Properties returns the properties of the blob.
	Properties() storage.BlobProperties

	// DeleteIfExists deletes the given blob from the specified container If the
	// blob is deleted with this call, returns true. Otherwise returns false.
	//
	// See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/Delete-Blob
	DeleteIfExists(*storage.DeleteBlobOptions) (bool, error)
}

Blob provides access to an Azure storage blob.

type BlobStorageClient

type BlobStorageClient interface {
	// GetContainerReference returns a Container object for the specified container name.
	GetContainerReference(name string) Container
}

BlobStorageClient is an interface providing access to Azure blob storage.

This interface the subet of functionality provided by https://godoc.org/github.com/Azure/azure-sdk-for-go/storage#BlobStorageClient that is required by Juju.

type Client

type Client interface {
	// GetBlobService returns a BlobStorageClient which can operate
	// on the blob service of the storage account.
	GetBlobService() BlobStorageClient
}

Client is an interface providing access to Azure storage services.

func NewClient

func NewClient(accountName, accountKey, blobServiceBaseURL, apiVersion string, useHTTPS bool) (Client, error)

NewClient returns a Client that is backed by a storage.Client created with storage.NewClient

type Container

type Container interface {
	// Blobs returns the blobs in the container.
	//
	// See https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/List-Blobs
	Blobs() ([]Blob, error)

	// Blob returns a Blob object for the specified blob name.
	Blob(name string) Blob
}

Container provides access to an Azure storage container.

type NewClientFunc

type NewClientFunc func(
	accountName, accountKey, blobServiceBaseURL, apiVersion string,
	useHTTPS bool,
) (Client, error)

NewClientFunc is the type of the NewClient function.

Source Files