Documentation ¶
Index ¶
- type Datastore
- func (ds *Datastore) Batch() (datastore.Batch, error)
- func (ds *Datastore) Delete(key datastore.Key) error
- func (ds *Datastore) Get(key datastore.Key) (value interface{}, err error)
- func (ds *Datastore) Has(key datastore.Key) (exists bool, err error)
- func (ds *Datastore) Put(key datastore.Key, value interface{}) error
- func (ds *Datastore) Query(q query.Query) (query.Results, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore struct { Path string Bucket string Region string // contains filtered or unexported fields }
Datastore is an implementation of the IPFS Datastore interface for Amazon S3 (Simple Storage Service)
func NewDatastore ¶
NewDatastore creates a new datastore, accepting zero or more functions that modify options
func (*Datastore) Batch ¶
Batch is an additional required method of the Batching interface, currently unsupported TODO - implement batching interface.
type Options ¶
type Options struct { // Scope to a specific "folder" within the bucket without leading or trailing slashes. eg "folder" or "folder/subfolder" Path string // The AWS region this bucket is located in. Default regin since March 8, 2013 is "us-west-2" // see: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region for regions list Region string // a valid access key for the named bucket is required, defaults to AWS_ACCESS_KEY_ID ENV variable AccessKey string // a valid access key for the named bucket is required, defaults to AWS_SECRET_ACCESS_KEY ENV variable AccessSecret string // AccessToken is only required when using temporary credentials, defaults to AWS_SESSION_TOKEN ENV variable AccessToken string }
Options configures a Datastore. DefaultOptions sets default values which can be modified by passing func(s) to NewDatastore
func DefaultOptions ¶
func DefaultOptions() *Options
DefaultOptions is the base set of options provided to New()
Click to show internal directories.
Click to hide internal directories.