Documentation ¶
Index ¶
- Variables
- type DB
- func (db *DB) CreateBucket(ctx context.Context, bucketName string, info *storj.Bucket) (bucketInfo storj.Bucket, err error)
- func (db *DB) CreateObject(ctx context.Context, bucket string, path storj.Path, ...) (object storj.MutableObject, err error)
- func (db *DB) DeleteBucket(ctx context.Context, bucketName string) (err error)
- func (db *DB) DeleteObject(ctx context.Context, bucket string, path storj.Path) (err error)
- func (db *DB) GetBucket(ctx context.Context, bucketName string) (bucketInfo storj.Bucket, err error)
- func (db *DB) GetObject(ctx context.Context, bucket string, path storj.Path) (info storj.Object, err error)
- func (db *DB) GetObjectStream(ctx context.Context, bucket string, path storj.Path) (stream storj.ReadOnlyStream, err error)
- func (db *DB) Limits() (storj.MetainfoLimits, error)
- func (db *DB) ListBuckets(ctx context.Context, options storj.BucketListOptions) (list storj.BucketList, err error)
- func (db *DB) ListObjects(ctx context.Context, bucket string, options storj.ListOptions) (list storj.ObjectList, err error)
- func (db *DB) ListPendingObjects(ctx context.Context, bucket string, options storj.ListOptions) (list storj.ObjectList, err error)
- func (db *DB) ModifyObject(ctx context.Context, bucket string, path storj.Path) (object storj.MutableObject, err error)
- func (db *DB) ModifyPendingObject(ctx context.Context, bucket string, path storj.Path) (object storj.MutableObject, err error)
- type Project
- func (db *Project) CreateBucket(ctx context.Context, bucketName string, info *storj.Bucket) (bucketInfo storj.Bucket, err error)
- func (db *Project) DeleteBucket(ctx context.Context, bucketName string) (err error)
- func (db *Project) GetBucket(ctx context.Context, bucketName string) (bucketInfo storj.Bucket, err error)
- func (db *Project) ListBuckets(ctx context.Context, options storj.BucketListOptions) (list storj.BucketList, err error)
Constants ¶
This section is empty.
Variables ¶
var DefaultES = storj.EncryptionScheme{ Cipher: storj.AESGCM, BlockSize: DefaultRS.StripeSize(), }
DefaultES default values for EncryptionScheme BlockSize should default to the size of a stripe
var DefaultRS = storj.RedundancyScheme{ Algorithm: storj.ReedSolomon, RequiredShares: 20, RepairShares: 30, OptimalShares: 40, TotalShares: 50, ShareSize: 1 * memory.KiB.Int32(), }
DefaultRS default values for RedundancyScheme
var ( // Error is the errs class of SetupProject Error = errs.Class("SetupProject error") )
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB implements metainfo database
func New ¶
func New(project *Project, metainfo *metainfo.Client, streams streams.Store, segments segments.Store, encStore *encryption.Store) *DB
New creates a new metainfo database
func (*DB) CreateBucket ¶ added in v0.14.0
func (db *DB) CreateBucket(ctx context.Context, bucketName string, info *storj.Bucket) (bucketInfo storj.Bucket, err error)
CreateBucket creates a new bucket with the specified information
func (*DB) CreateObject ¶
func (db *DB) CreateObject(ctx context.Context, bucket string, path storj.Path, createInfo *storj.CreateObject) (object storj.MutableObject, err error)
CreateObject creates an uploading object and returns an interface for uploading Object information
func (*DB) DeleteBucket ¶ added in v0.14.0
DeleteBucket deletes bucket
func (*DB) DeleteObject ¶
DeleteObject deletes an object from database
func (*DB) GetBucket ¶ added in v0.14.0
func (db *DB) GetBucket(ctx context.Context, bucketName string) (bucketInfo storj.Bucket, err error)
GetBucket gets bucket information
func (*DB) GetObject ¶
func (db *DB) GetObject(ctx context.Context, bucket string, path storj.Path) (info storj.Object, err error)
GetObject returns information about an object
func (*DB) GetObjectStream ¶
func (db *DB) GetObjectStream(ctx context.Context, bucket string, path storj.Path) (stream storj.ReadOnlyStream, err error)
GetObjectStream returns interface for reading the object stream
func (*DB) Limits ¶
func (db *DB) Limits() (storj.MetainfoLimits, error)
Limits returns limits for this metainfo database
func (*DB) ListBuckets ¶ added in v0.14.0
func (db *DB) ListBuckets(ctx context.Context, options storj.BucketListOptions) (list storj.BucketList, err error)
ListBuckets lists buckets
func (*DB) ListObjects ¶
func (db *DB) ListObjects(ctx context.Context, bucket string, options storj.ListOptions) (list storj.ObjectList, err error)
ListObjects lists objects in bucket based on the ListOptions
func (*DB) ListPendingObjects ¶
func (db *DB) ListPendingObjects(ctx context.Context, bucket string, options storj.ListOptions) (list storj.ObjectList, err error)
ListPendingObjects lists pending objects in bucket based on the ListOptions
type Project ¶
type Project struct {
// contains filtered or unexported fields
}
Project implements project management operations
func NewProject ¶
func NewProject(streams streams.Store, encryptedBlockSize int32, redundancy eestream.RedundancyStrategy, segmentsSize int64) *Project
NewProject constructs a *Project
func SetupProject ¶ added in v0.14.0
SetupProject creates a project with temporary values until we can figure out how to bypass encryption related setup
func (*Project) CreateBucket ¶
func (db *Project) CreateBucket(ctx context.Context, bucketName string, info *storj.Bucket) (bucketInfo storj.Bucket, err error)
CreateBucket creates a new bucket with the specified information
func (*Project) DeleteBucket ¶
DeleteBucket deletes bucket
func (*Project) GetBucket ¶
func (db *Project) GetBucket(ctx context.Context, bucketName string) (bucketInfo storj.Bucket, err error)
GetBucket gets bucket information
func (*Project) ListBuckets ¶
func (db *Project) ListBuckets(ctx context.Context, options storj.BucketListOptions) (list storj.BucketList, err error)
ListBuckets lists buckets