fs

package
v0.0.0-...-094c5f7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContentStore

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

ContentStore provides a simple file system based storage.

func NewContentStore

func NewContentStore(base string) (*ContentStore, error)

NewContentStore creates a ContentStore at the base directory.

func (*ContentStore) Exists

func (s *ContentStore) Exists(m *meta.Object) bool

Exists returns true if the object exists in the content store.

func (*ContentStore) Get

func (s *ContentStore) Get(m *meta.Object) (io.ReadCloser, error)

Get takes a Meta object and retreives the content from the store, returning it as an io.Reader.

func (*ContentStore) Put

func (s *ContentStore) Put(m *meta.Object, r io.Reader) error

Put takes a Meta object and an io.Reader and writes the content to the store.

func (*ContentStore) Verify

func (s *ContentStore) Verify(m *meta.Object) error

Jump to

Keyboard shortcuts

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