buckets

package
v0.8.7 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2019 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BucketStore

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

BucketStore contains objects store

func (*BucketStore) Delete

func (b *BucketStore) Delete(ctx context.Context, bucket string) (err error)

Delete calls objects store Delete

func (*BucketStore) Get

func (b *BucketStore) Get(ctx context.Context, bucket string) (meta Meta, err error)

Get calls objects store Get

func (*BucketStore) GetObjectStore

func (b *BucketStore) GetObjectStore(ctx context.Context, bucket string) (objects.Store, error)

GetObjectStore returns an implementation of objects.Store

func (*BucketStore) List

func (b *BucketStore) List(ctx context.Context, startAfter, endBefore string, limit int) (items []ListItem, more bool, err error)

List calls objects store List

func (*BucketStore) Put

func (b *BucketStore) Put(ctx context.Context, bucket string, pathCipher storj.Cipher) (meta Meta, err error)

Put calls objects store Put

type ListItem

type ListItem struct {
	Bucket string
	Meta   Meta
}

ListItem is a single item in a listing

type Meta

type Meta struct {
	Created            time.Time
	PathEncryptionType storj.Cipher
	SegmentsSize       int64
	RedundancyScheme   storj.RedundancyScheme
	EncryptionScheme   storj.EncryptionScheme
}

Meta is the bucket metadata struct

type Store

type Store interface {
	Get(ctx context.Context, bucket string) (meta Meta, err error)
	Put(ctx context.Context, bucket string, pathCipher storj.Cipher) (meta Meta, err error)
	Delete(ctx context.Context, bucket string) (err error)
	List(ctx context.Context, startAfter, endBefore string, limit int) (items []ListItem, more bool, err error)
	GetObjectStore(ctx context.Context, bucketName string) (store objects.Store, err error)
}

Store creates an interface for interacting with buckets

func NewStore

func NewStore(stream streams.Store) Store

NewStore instantiates BucketStore

Directories

Path Synopsis
Package buckets is a generated GoMock package.
Package buckets is a generated GoMock package.

Jump to

Keyboard shortcuts

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