Documentation ¶
Overview ¶
Package s3 is our client with storj minio gateways
Index ¶
- type Config
- type Datastore
- func (d *Datastore) Batch() (ds.Batch, error)
- func (d *Datastore) BucketExists(name string) error
- func (d *Datastore) Close() error
- func (d *Datastore) CreateBucket(name string) error
- func (d *Datastore) Delete(k ds.Key) error
- func (d *Datastore) DeleteBucket(name string) error
- func (d *Datastore) Get(k ds.Key) ([]byte, error)
- func (d *Datastore) GetSize(k ds.Key) (size int, err error)
- func (d *Datastore) Has(k ds.Key) (exists bool, err error)
- func (d *Datastore) Put(k ds.Key, value []byte) error
- func (d *Datastore) Query(q dsq.Query) (dsq.Results, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { AccessKey string SecretKey string // SessionToken string Bucket string Region string Endpoint string RootDirectory string LogPath string Secure bool Workers int }
Config is used to configure our gateway
type Datastore ¶
Datastore is our interface to minio
func NewDatastore ¶
NewDatastore is used to create our datastore against the minio gateway powered by storj
func (*Datastore) BucketExists ¶
BucketExists is used to lookup if the designated bucket exists
func (*Datastore) CreateBucket ¶
CreateBucket is used to create a bucket
func (*Datastore) DeleteBucket ¶
DeleteBucket is used to remove the specified bucket
func (*Datastore) Get ¶
Get is used to retrieve data from our storj backed s3 datastore we do not log errors here since checking if an object exists is part of the IPFS operation process when adding a file it avoids having to needlessly operate n files
func (*Datastore) Has ¶
Has is used to check if we already have an object matching this key we do not log errors here since checking if an object exists is part of the IPFS operation process when adding a file it avoids having to needlessly operate n files