azure

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultBlobMaxRetryRequests Default value for Azure Blob Storage Max Retry Requests.
	DefaultBlobMaxRetryRequests = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

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

Backend implements sotrage.Backend for Azure Blob Storage.

func New

func New(l log.Logger, c Config) (*Backend, error)

New creates an AzureBlob backend.

func (*Backend) Exists

func (b *Backend) Exists(ctx context.Context, p string) (bool, error)

Exists checks if path already exists.

func (*Backend) Get

func (b *Backend) Get(ctx context.Context, p string, w io.Writer) error

Get writes downloaded content to the given writer.

func (*Backend) Put

func (b *Backend) Put(ctx context.Context, p string, r io.Reader) error

Put uploads contents of the given reader.

type Config

type Config struct {
	AccountName      string
	AccountKey       string
	ContainerName    string
	BlobStorageURL   string
	Azurite          bool
	MaxRetryRequests int
	Timeout          time.Duration
}

Config is a structure to store Azure backend configuration.

Jump to

Keyboard shortcuts

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