blobstore

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2019 License: MIT Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBlobNotExists indicates that requested blob does not exist
	ErrBlobNotExists = errors.New("requested blob does not exist")
	// ErrBucketNotExists indicates that requested bucket does not exist
	ErrBucketNotExists = errors.New("requested bucket does not exist")
)

Functions

This section is empty.

Types

type Blob

type Blob struct {
	Body            io.Reader
	CompressionType CompressionType
	Tags            map[string]string
}

Blob defines a blob

type BucketMetadataResponse

type BucketMetadataResponse struct {
	Owner         string
	RetentionDays int
}

BucketMetadataResponse contains information relating to a bucket's configuration

type Client

type Client interface {
	UploadBlob(ctx context.Context, bucket string, filename string, blob *Blob) error
	DownloadBlob(ctx context.Context, bucket string, filename string) (*Blob, error)
	BucketMetadata(ctx context.Context, bucket string) (*BucketMetadataResponse, error)
}

Client is used to operate on blobs in a blobstore

type CompressionType

type CompressionType int

CompressionType defines the type of compression used for a blob

const (
	// NoCompression indicates that blob is not compressed
	NoCompression CompressionType = iota
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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