s3ds

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2019 License: MIT Imports: 14 Imported by: 5

README

S3 Datastore Implementation

This is an implementation of the datastore interface backed by amazon s3.

Documentation

Index

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
	RegionEndpoint string
	RootDirectory  string
	Workers        int
}

type S3Bucket

type S3Bucket struct {
	Config
	S3 *s3.S3
}

func NewS3Datastore

func NewS3Datastore(conf Config) (*S3Bucket, error)

func (*S3Bucket) Batch

func (s *S3Bucket) Batch() (ds.Batch, error)

func (*S3Bucket) Close

func (s *S3Bucket) Close() error

func (*S3Bucket) Delete

func (s *S3Bucket) Delete(k ds.Key) error

func (*S3Bucket) Get

func (s *S3Bucket) Get(k ds.Key) ([]byte, error)

func (*S3Bucket) GetSize

func (s *S3Bucket) GetSize(k ds.Key) (size int, err error)

func (*S3Bucket) Has

func (s *S3Bucket) Has(k ds.Key) (exists bool, err error)

func (*S3Bucket) Put

func (s *S3Bucket) Put(k ds.Key, value []byte) error

func (*S3Bucket) Query

func (s *S3Bucket) Query(q dsq.Query) (dsq.Results, error)

Jump to

Keyboard shortcuts

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