Documentation
¶
Index ¶
- func BytesToString(b []byte) string
- func BytesToStringUnsafe(b []byte) string
- func CreateBucket(db *bolt.DB, bucketName string) error
- func DeleteObject(db *bolt.DB, bucketName string, key []byte) error
- func GetNextIdentifier(db *bolt.DB, bucketName string) int
- func GetObject(db *bolt.DB, bucketName string, key []byte, object interface{}) error
- func GetString(db *bolt.DB, bucketName string, key []byte) (string, error)
- func Itob(v int) []byte
- func MD5Hash(text string) string
- func MarshalObject(object interface{}) ([]byte, error)
- func StringToBytes(s string) []byte
- func StringToBytesUnsafe(s string) []byte
- func UnmarshalObject(data []byte, object interface{}) error
- func UnmarshalObjectWithJsoniter(data []byte, object interface{}) error
- func UpdateObject(db *bolt.DB, bucketName string, key []byte, object interface{}) error
- func UpdateString(db *bolt.DB, bucketName string, key []byte, value []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToString ¶
func BytesToStringUnsafe ¶
func CreateBucket ¶
CreateBucket is a generic function used to create a bucket inside a bolt database.
func DeleteObject ¶
DeleteObject is a generic function used to delete an object inside a bolt database.
func GetNextIdentifier ¶
GetNextIdentifier is a generic function that returns the specified bucket identifier incremented by 1.
func GetObject ¶
GetObject is a generic function used to retrieve an unmarshalled object from a bolt database.
func GetString ¶
GetString is a generic function used to retrieve an unmarshalled object from a bolt database.
func Itob ¶
Itob returns an 8-byte big endian representation of v. This function is typically used for encoding integer IDs to byte slices so that they can be used as BoltDB keys.
func MarshalObject ¶
MarshalObject encodes an object to binary format
func StringToBytes ¶
func StringToBytesUnsafe ¶
func UnmarshalObject ¶
UnmarshalObject decodes an object from binary data
func UnmarshalObjectWithJsoniter ¶
UnmarshalObjectWithJsoniter decodes an object from binary data using the jsoniter library. It is mainly used to accelerate endpoint decoding at the moment.
func UpdateObject ¶
UpdateObject is a generic function used to update an object inside a bolt database.
Types ¶
This section is empty.