storage

package
v0.0.0-...-8fff639 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2015 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrPartialData is the result of an unexpected amount of data being read.
	ErrPartialData = errors.New("Partial data recovered")
)

Functions

This section is empty.

Types

type Storage

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

Storage for objects.

func New

func New(baseFilename string) (storage *Storage, err error)

New storage constructor.

func (*Storage) Add

func (storage *Storage) Add(data []byte) (id uint64, err error)

Add data to storage.

func (*Storage) Close

func (storage *Storage) Close() (err error)

Close all file connections.

func (*Storage) Delete

func (storage *Storage) Delete(id uint64) (err error)

Delete data stored at key 'id'.

func (*Storage) Get

func (storage *Storage) Get(id uint64) (data []byte, err error)

Get data stored at key 'id'.

func (*Storage) Wipe

func (storage *Storage) Wipe() (err error)

Wipe all storage files from disk.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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