dbbadger

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeKey

func EncodeKey(key interface{}, typeName string) ([]byte, error)

EncodeKey encodes key values with a type prefix which allows multiple different types to exist in the badger DB

func NewDepositRepositoryImpl added in v0.6.0

func NewDepositRepositoryImpl(
	store *badgerhold.Store,
) domain.DepositRepository

NewDepositRepositoryImpl initialize a badger implementation of the domain.StatsRepository

func NewMarketRepositoryImpl

func NewMarketRepositoryImpl(
	store, priceStore *badgerhold.Store,
) domain.MarketRepository

NewMarketRepositoryImpl initialize a badger implementation of the domain.MarketRepository

func NewRepoManager added in v0.3.1

func NewRepoManager(baseDbDir string, logger badger.Logger) (ports.RepoManager, error)

NewRepoManager opens (or creates if not exists) the badger store on disk. It expects a base data dir and an optional logger. It creates a dedicated directory for main and prices stores, while the unspent repository lives in memory.

func NewTradeRepositoryImpl

func NewTradeRepositoryImpl(store *badgerhold.Store) domain.TradeRepository

func NewWithdrawalRepositoryImpl added in v0.6.0

func NewWithdrawalRepositoryImpl(
	store *badgerhold.Store,
) domain.WithdrawalRepository

NewWithdrawalRepositoryImpl is the factory for a badger implementation of domain.WithdrawalRepository

Types

This section is empty.

Jump to

Keyboard shortcuts

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