leveldb

package
v0.0.6-rc2 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetRandomTestStoragePath

func GetRandomTestStoragePath() string

GetRandomTestStoragePath generates a random path for DB storage

func NewLevelDBRepository

func NewLevelDBRepository(db *leveldb.DB) storage.Repository

NewLevelDBRepository returns levelDb implementation of Repository

func NewLevelDBStorage

func NewLevelDBStorage(path string) (*leveldb.DB, error)

NewLevelDBStorage is a singleton implementation returning the default database as configured.

Types

type Bootstrapper

type Bootstrapper struct{}

Bootstrapper implements bootstrapper.Bootstrapper.

func (*Bootstrapper) Bootstrap

func (*Bootstrapper) Bootstrap(context map[string]interface{}) error

Bootstrap initialises the levelDB.

type Config

type Config interface {
	GetStoragePath() string
	GetConfigStoragePath() string
	SetDefault(key string, value interface{})
}

Config holds configuration data for storage package

Jump to

Keyboard shortcuts

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