database

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeySize    = "database.users[%s].size"
	KeyMessage = "database.users[%s].messages[%d]"
	KeyHash    = "database.hashes[%s]"
)

Variables

This section is empty.

Functions

func GetKeyHash

func GetKeyHash(key []byte) []byte

func GetKeyMessage

func GetKeyMessage(key []byte, i uint64) []byte

func GetKeySize

func GetKeySize(key []byte) []byte

Types

type IKeyValueDB

type IKeyValueDB interface {
	Size([]byte) uint64
	Push([]byte, local.IMessage) error
	Load([]byte, uint64) local.IMessage

	Close() error
	Clean() error
	// contains filtered or unexported methods
}

func NewKeyValueDB

func NewKeyValueDB(path string) IKeyValueDB

Jump to

Keyboard shortcuts

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