store

package module
v0.0.0-...-85d06ed Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2015 License: MIT Imports: 7 Imported by: 0

README

store

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Concurrency = 32
)

Functions

func Get

func Get(path string) (io.ReadCloser, int, error)

func Put

func Put(path string, r io.Reader) error

Types

type LocalObject

type LocalObject *os.File

type LocalStore

type LocalStore struct {
}

func (*LocalStore) Get

func (l *LocalStore) Get(path string) (io.ReadCloser, int, error)

func (*LocalStore) Put

func (l *LocalStore) Put(path string, r io.Reader) error

type S3Store

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

func (S3Store) Get

func (s S3Store) Get(path string) (io.ReadCloser, int, error)

func (S3Store) Put

func (s S3Store) Put(path string, r io.Reader) error

type Store

type Store interface {
	// Get retrieves a single Object interface
	Get(string) (io.ReadCloser, int, error)
	// Put takes an io.Reader and stores an object to the given location returning an error
	Put(string, io.Reader) error
}

Store implements an interface for accessing Collections

func NewLocalStore

func NewLocalStore() Store

func NewS3Store

func NewS3Store(accesskey, secret, bucket string) Store

Jump to

Keyboard shortcuts

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