Documentation
¶
Index ¶
- Constants
- type DB
- type LocalDB
- func (db *LocalDB) Get(path [][]byte, key []byte) ([]byte, error)
- func (db *LocalDB) GetAny(path [][]byte, key []byte) (any, error)
- func (db *LocalDB) GetBool(path [][]byte, key []byte) (bool, error)
- func (db *LocalDB) GetInt(path [][]byte, key []byte) (int, error)
- func (db *LocalDB) GetString(path [][]byte, key []byte) (string, error)
- func (db *LocalDB) List(path [][]byte) ([][]byte, error)
- func (db *LocalDB) ListKeys(path [][]byte) ([][]byte, error)
- func (db *LocalDB) Put(path [][]byte, key []byte, value []byte) error
- func (db *LocalDB) PutBool(path [][]byte, key []byte, value bool) error
- func (db *LocalDB) PutInt(path [][]byte, key []byte, value int) error
- func (db *LocalDB) PutString(path [][]byte, key []byte, value string) error
Constants ¶
View Source
const ( OPEN_RO_PERMS = 0o600 OPEN_RW_PERMS = 0o400 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface {
// Getters
Get([][]byte, []byte) ([]byte, error)
GetString([][]byte, []byte) (string, error)
GetBool([][]byte, []byte) (bool, error)
GetInt([][]byte, []byte) (int, error)
// Setters (create or update)
Put([][]byte, []byte, []byte) error
PutString([][]byte, []byte, string) error
PutBool([][]byte, []byte, bool) error
PutInt([][]byte, []byte, int) error
// Listers
List([][]byte) ([][]byte, error)
ListKeys([][]byte) ([][]byte, error)
}
Opening/creation of files/buckets must be managed by implementation [][]byte is used to represent a path to a bucket (for nested buckets)
func NewLocalDB ¶
Click to show internal directories.
Click to hide internal directories.