Documentation ¶
Index ¶
- Variables
- func Bucket(txn *bolt.Tx) *bolt.Bucket
- func Copy(v []byte) []byte
- func Defrag(dir string) error
- func Del(txn *bolt.Bucket, key []byte, header Header) error
- func Get(txn *bolt.Bucket, key []byte, dat proto.Unmarshaler, header Header) error
- func Has(txn *bolt.Bucket, key []byte, header Header) bool
- func Iterate(txn *bolt.Bucket, header Header, f func([]byte, []byte) error) error
- func IterateReverse(txn *bolt.Bucket, header Header, f func([]byte, []byte) error) error
- func Key(okey []byte, h Header) []byte
- func Open(dir, name string) (*bolt.DB, error)
- func Put(txn *bolt.Bucket, key []byte, dat proto.Marshaler, header Header) error
- type Header
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrKeyNotFound = errors.New("key not found")
ErrKeyNotFound is the error that key is not found in db.
Functions ¶
func IterateReverse ¶
IterateReverse iterates data with header in reverse.
Types ¶
type Header ¶
type Header byte
Header is a header type of db.
const ( HeaderDBVersion Header = iota + 1 HeaderTxInfo HeaderTxSig HeaderNodeIP HeaderTxRewardFee HeaderTxRewardTicket HeaderAddressToTx HeaderBalance // HeaderMultisigAddress HeaderOTATx HeaderRichlist HeaderDistribution HeaderInt2Tx HeaderLeaves HeaderUnresolvedTx HeaderUnresolvedPrevHashes HeaderPrevToTx HeaderNoexist HeaderPendings HeaderRejected HeaderLatestTxs HeaderWallet HeaderWalletHistory // HeaderWalletConfig HeaderWalletLastOTATx )
Headers for DB key.
Click to show internal directories.
Click to hide internal directories.