Documentation ¶
Index ¶
- Variables
- func GzipCompress(src []byte) ([]byte, error)
- func GzipUncompress(src []byte) ([]byte, error)
- func PaddingZero(val any, length int) string
- func ParseReflectValue(val reflect.Value) (any, bool)
- func ToBytes(data any) []byte
- func ToModelName(model any) string
- type DB
- type ListOption
- type Txn
- func (t *Txn) Dec(key string, step int64) (int64, error)
- func (t *Txn) Del(key string) error
- func (t *Txn) Get(key string) ([]byte, error)
- func (t *Txn) Has(key string) bool
- func (t *Txn) Inc(key string, step int64) (int64, error)
- func (txn *Txn) IndexAdd(model any, field string, val, id any) error
- func (txn *Txn) IndexClear(model any, field string, val any) error
- func (txn *Txn) IndexCount(model any, field string, val any) (total int64)
- func (txn *Txn) IndexDel(model any, field string, val, id any) error
- func (txn *Txn) IndexFirst(model any, field string, val any) (string, error)
- func (txn *Txn) IndexList(model any, field string, val any, opts ...*ListOption) (list []string, err error)
- func (txn *Txn) IndexModel(id, model any) error
- func (t *Txn) List(prefix string, fn func(key string, value []byte) (stop bool, err error), ...) error
- func (t *Txn) Set(key string, value any) error
- func (t *Txn) Unmarshal(key string, value any) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrKeyNotFound = errors.New("key not found")
)
Functions ¶
func GzipCompress ¶
func GzipUncompress ¶
func PaddingZero ¶ added in v3.1.4
func ParseReflectValue ¶ added in v3.2.0
Whether value can be taken directly
func ToModelName ¶ added in v3.2.0
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
type ListOption ¶ added in v3.1.1
type Txn ¶
type Txn struct {
// contains filtered or unexported fields
}
func (*Txn) IndexClear ¶ added in v3.1.6
func (*Txn) IndexCount ¶ added in v3.1.6
func (*Txn) IndexFirst ¶ added in v3.2.0
func (*Txn) IndexModel ¶ added in v3.2.0
Click to show internal directories.
Click to hide internal directories.