database

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2020 License: Apache-2.0, BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBPrefixApprovers byte = iota
	DBPrefixTransaction
	DBPrefixBundle
	DBPrefixTransactionMetadata
	DBPrefixAddressTransactions
	DBPrefixAutoPeering
	DBPrefixDatabaseVersion
)
View Source
const (
	CFG_DIRECTORY = "database.directory"
)
View Source
const (
	// DBVersion defines the version of the database schema this version of GoShimmer supports.
	// everytime there's a breaking change regarding the stored data, this version flag should be adjusted.
	DBVersion = 1
)

Variables

View Source
var (
	ErrDBVersionIncompatible = errors.New("database version is not compatible. please delete your database folder and restart")
)
View Source
var (
	ErrKeyNotFound = database.ErrKeyNotFound
)

Functions

func CleanupBadgerInstance

func CleanupBadgerInstance(log *logger.Logger)

func GetBadgerInstance

func GetBadgerInstance() *badger.DB

Types

type Database

type Database = database.Database

func Get

func Get(dbPrefix byte, optionalBadger ...*badger.DB) (Database, error)

type Entry

type Entry = database.Entry

type Key

type Key = database.Key

type KeyOnlyEntry

type KeyOnlyEntry = database.KeyOnlyEntry

type KeyPrefix

type KeyPrefix = database.KeyPrefix

type Value

type Value = database.Value

Directories

Path Synopsis
Package mapdb provides a map implementation of a key value database.
Package mapdb provides a map implementation of a key value database.

Jump to

Keyboard shortcuts

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