database

package
v0.0.0-...-d4d6057 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = fmt.Errorf("not found")
)

Functions

This section is empty.

Types

type Database

type Database interface {
	Find(id ID, receiver Storable) error
	Save(id ID, storable Storable) error
	Delete(ID) error
}

func NewMapDatabase

func NewMapDatabase() Database

func OpenBoltDb

func OpenBoltDb(filename string) (Database, error)

type ID

type ID []byte

func NewID

func NewID() ID

func (ID) String

func (id ID) String() string

type Storable

type Storable interface {
	encoding.BinaryMarshaler
	encoding.BinaryUnmarshaler
}

Jump to

Keyboard shortcuts

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