storage

package
v0.0.0-...-a88d24b Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2014 License: ISC Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("Not found")

Functions

This section is empty.

Types

type AccountLookup

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

func NewAddressLookup

func NewAddressLookup(db IndexedDB) (*AccountLookup, error)

func (*AccountLookup) Get

func (l *AccountLookup) Get(n uint32) *data.Account

func (AccountLookup) Lookup

func (l AccountLookup) Lookup(value interface{}) (uint32, error)

type CurrencyLookup

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

func NewCurrencyLookup

func NewCurrencyLookup(db IndexedDB) (*CurrencyLookup, error)

func (*CurrencyLookup) Get

func (l *CurrencyLookup) Get(n uint32) *data.Currency

func (CurrencyLookup) Lookup

func (l CurrencyLookup) Lookup(value interface{}) (uint32, error)

type DB

type DB interface {
	Ledger() (*data.LedgerSet, error)
	Get(hash data.Hash256) (data.Hashable, error)
	Insert(data.Hashable) error
	Stats() string
	Close()
}

type IndexedDB

type IndexedDB interface {
	DB
	Query(*data.Query) ([]data.Hashable, error)
	InsertLookup(string, *LookupItem) error
	GetLookups(string) ([]LookupItem, error)
	GetAccount(uint32) *data.Account
}

type LookupItem

type LookupItem struct {
	Id    uint32
	Value interface{}
	Human string
}

type MemoryDB

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

func NewEmptyMemoryDB

func NewEmptyMemoryDB() *MemoryDB

func NewMemoryDB

func NewMemoryDB(path string) (*MemoryDB, error)

func (*MemoryDB) Close

func (mem *MemoryDB) Close()

func (*MemoryDB) Get

func (mem *MemoryDB) Get(hash data.Hash256) (data.Hashable, error)

func (*MemoryDB) Insert

func (mem *MemoryDB) Insert(item data.Hashable) error

func (*MemoryDB) Ledger

func (mem *MemoryDB) Ledger() (*data.LedgerSet, error)

func (*MemoryDB) Stats

func (mem *MemoryDB) Stats() string

type PublicKeyLookup

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

func NewPublicKeyLookup

func NewPublicKeyLookup(db IndexedDB) (*PublicKeyLookup, error)

func (*PublicKeyLookup) Get

func (l *PublicKeyLookup) Get(n uint32) *data.PublicKey

func (PublicKeyLookup) Lookup

func (l PublicKeyLookup) Lookup(value interface{}) (uint32, error)

type RegularKeyLookup

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

func NewRegularKeyLookup

func NewRegularKeyLookup(db IndexedDB) (*RegularKeyLookup, error)

func (*RegularKeyLookup) Get

func (RegularKeyLookup) Lookup

func (l RegularKeyLookup) Lookup(value interface{}) (uint32, error)

type RocksDB

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

func NewRocksDB

func NewRocksDB(path string) (*RocksDB, error)

func (*RocksDB) Close

func (db *RocksDB) Close()

func (*RocksDB) Get

func (db *RocksDB) Get(hash data.Hash256) (data.Hashable, error)

func (*RocksDB) Stats

func (db *RocksDB) Stats() string

Jump to

Keyboard shortcuts

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