bunt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const EncPrefixDB = "DB"

EncPrefixDB contains profix of DB

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionConfig

type ConnectionConfig struct {
	Filename string `env:"_FILENAME" envDefault:":memory:"`
}

ConnectionConfig contains listen url for the server and additional options

func GetConnectionConfigFromEnv

func GetConnectionConfigFromEnv(prefix string) (*ConnectionConfig, error)

GetConnectionConfigFromEnv return server configs bases on environment variables

type Wrapper

type Wrapper struct {
	*buntdb.DB
}

Wrapper wrapper of buntdb

func GetConnection

func GetConnection() (*Wrapper, error)

GetConnection return new connection to buntdb

func (*Wrapper) Get

func (w *Wrapper) Get(name string, value interface{}) error

Get get value by key

func (*Wrapper) Set

func (w *Wrapper) Set(name string, value interface{}) error

Set set value by key

Jump to

Keyboard shortcuts

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