Documentation
¶
Index ¶
- Constants
- Variables
- type DB
- func (db *DB) Close(delete bool) error
- func (db *DB) Delete(key string) error
- func (db *DB) Get(key string) ([]byte, error)
- func (db *DB) GetMultipleBySuffix(suffix string) ([]string, [][]byte, error)
- func (db *DB) Keys() ([]string, error)
- func (db *DB) Purge() error
- func (db *DB) Put(key string, val []byte) error
- type Record
Constants ¶
View Source
const (
// KeyTemplate describes the format of the keys inside of a bucket
KeyTemplate = "%s-%s"
)
Variables ¶
View Source
var ( ErrNotFound = xerrors.New("key not found") ErrNilValue = xerrors.New("value is nil") )
Package vars
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
DB describes local BoltDB database
func (*DB) GetMultipleBySuffix ¶
GetMultipleBySuffix returns keys and non-empty values, for which the key contains the suffix It returns all keys and values from the bucket if the suffix is empty
type Record ¶
type Record struct {
models.ArchRecord
Timestamp int64 `json:"ts"`
}
Record is used to store models.ArchRecord in DB
Click to show internal directories.
Click to hide internal directories.