example

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SEP_K = "^"
	SEP_V = "^"
)

Variables

This section is empty.

Functions

func CloseDB

func CloseDB()

func DelDB1First

func DelDB1First(prefix string) (int, error)

func GetDB1Count

func GetDB1Count(prefix string, filter func(*DB1) bool) (int, error)

func GetDB1Data

func GetDB1Data(id string) ([]string, error)

func UpdateDB1First

func UpdateDB1First(prefix string, object *DB1) (int, error)

Types

type DB1

type DB1 struct {
	// contains filtered or unexported fields
}

func GetDB1

func GetDB1(id string) (*DB1, error)

func GetDB1First

func GetDB1First(prefix string, filter func(*DB1) bool) (*DB1, error)

func GetDB1s

func GetDB1s(prefix string, filter func(*DB1) bool) ([]*DB1, error)

func NewDB1

func NewDB1(id string) *DB1

func (*DB1) AddData

func (db1 *DB1) AddData(items ...string) error

func (*DB1) BadgerDB

func (db1 *DB1) BadgerDB() *badger.DB

func (*DB1) Key

func (db1 *DB1) Key() []byte

func (*DB1) Marshal

func (db1 *DB1) Marshal(at any) (forKey, forValue []byte)

func (*DB1) RmData

func (db1 *DB1) RmData(items ...string) error

func (DB1) String

func (db1 DB1) String() string

func (*DB1) Unmarshal

func (db1 *DB1) Unmarshal(dbKey, dbVal []byte) (any, error)

type DBGrp

type DBGrp struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func InitDB

func InitDB(dir string) *DBGrp

init global 'dbGrp'

Jump to

Keyboard shortcuts

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