Documentation ¶
Index ¶
- Variables
- func Count(tx *bolt.Tx, bucket string, prefix []byte) (int, error)
- func Del(tx *bolt.Tx, bucket string, key []byte) error
- func DelMap(tx *bolt.Tx, bucket string, key []byte, val string) error
- func Get(tx *bolt.Tx, bucket string, key []byte, value interface{}) ([]byte, error)
- func GetMap(tx *bolt.Tx, bucket string, key []byte) (map[string]struct{}, error)
- func GetPrefixs(tx *bolt.Tx, bucket string) ([]string, error)
- func GetStrings(tx *bolt.Tx, bucket string, prefix []byte) ([]string, error)
- func HasKey(tx *bolt.Tx, bucket string, key []byte) (bool, error)
- func HasVal(tx *bolt.Tx, bucket string, key []byte, val string) bool
- func KeyStrings(tx *bolt.Tx, bucket string) ([]string, error)
- func MapKeys(tx *bolt.Tx, bucket string, key []byte) ([]string, error)
- func MustTob(v interface{}) []byte
- func Put(tx *bolt.Tx, bucket string, key []byte, value interface{}) error
- func PutMap(tx *bolt.Tx, bucket string, key []byte, val string) error
- func Setup()
- func ToKey(v ...interface{}) []byte
- func Tob(v interface{}) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *bolt.DB
DB is bolt.DB for operating database.
Functions ¶
func GetPrefixs ¶ added in v0.2.0
GetPrefixs get string prefixs of keys.
func GetStrings ¶ added in v0.2.0
GetStrings returns string values whose key has prefix.
func KeyStrings ¶ added in v0.2.0
KeyStrings returns string keys.
func MustTob ¶ added in v0.2.0
func MustTob(v interface{}) []byte
MustTob is Tob , except that this fatals when error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.