blobstore

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2019 License: MIT Imports: 5 Imported by: 2 modules, 4 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBucketNotExists indicates that requested bucket does not exist
	ErrBucketNotExists = &shared.EntityNotExistsError{Message: "requested bucket does not exist"}
	// ErrBlobNotExists indicates that requested blob does not exist
	ErrBlobNotExists = &shared.EntityNotExistsError{Message: "requested blob does not exist"}
	// ErrBlobSerialization indicates that a failure occurred in serializing blob
	ErrBlobSerialization = &shared.BadRequestError{Message: "failed to serialize blob"}
	// ErrBlobDeserialization indicates that a failure occurred in deserializing blob
	ErrBlobDeserialization = &shared.BadRequestError{Message: "failed to deserialize blob"}
)

Functions

This section is empty.

Types

type BucketMetadataResponse

type BucketMetadataResponse struct {
	Owner         string
	RetentionDays int
}

BucketMetadataResponse contains information relating to a bucket's configuration

type Client

type Client interface {
	Upload(ctx context.Context, bucket string, key blob.Key, blob *blob.Blob) error
	Download(ctx context.Context, bucket string, key blob.Key) (*blob.Blob, error)
	Exists(ctx context.Context, bucket string, key blob.Key) (bool, error)
	Delete(ctx context.Context, bucket string, key blob.Key) (bool, error)
	ListByPrefix(ctx context.Context, bucket string, prefix string) ([]blob.Key, error)
	BucketMetadata(ctx context.Context, bucket string) (*BucketMetadataResponse, error)
}

Client is used to operate on blobs in a blobstore

func NewMetricClient added in v0.5.2

func NewMetricClient(client Client, metricsClient metrics.Client) Client

NewMetricClient creates a new instance of Client that emits metrics

func NewRetryableClient added in v0.5.2

func NewRetryableClient(client Client, policy backoff.RetryPolicy, isRetryable backoff.IsRetryable) Client

NewRetryableClient creates a new instance of Client with retry policy

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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