db

package
v1.9.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	NameIdent = "peername"
	FileName  = "data.db"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BoltDB

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

func NewBoltDB

func NewBoltDB(dbPathname string) (*BoltDB, error)

func NewBoltDBReadOnly added in v1.9.0

func NewBoltDBReadOnly(dbPathname string) (*BoltDB, error)

func (*BoltDB) Close

func (d *BoltDB) Close() error

func (*BoltDB) Load

func (d *BoltDB) Load(ident string, data interface{}) (bool, error)

func (*BoltDB) Save

func (d *BoltDB) Save(ident string, data interface{}) error

type DB

type DB interface {
	Load(string, interface{}) (bool, error)
	Save(string, interface{}) error
}

Jump to

Keyboard shortcuts

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