Documentation
¶
Index ¶
- func AddValue(bucket string, key []byte, value []byte) error
- func AddValueCompress(bucket string, key []byte, value []byte) error
- func Count(o interface{}) (int, error)
- func Delete(o interface{}) error
- func DeleteBucket(bucket string, key []byte) error
- func DeleteValue(bucket string, key []byte, value []byte) error
- func Get(o interface{}) error
- func GetCompressedValue(bucket string, key []byte) ([]byte, error)
- func GetValue(bucket string, key []byte) ([]byte, error)
- func Register(h ORM)
- func RegisterKVHandler(h KVStore)
- func Save(o interface{}) error
- func Update(o interface{}) error
- type BoolType
- type Cond
- func And(conds ...*Cond) []*Cond
- func Eq(field string, value interface{}) *Cond
- func Ge(field string, value interface{}) *Cond
- func Gt(field string, value interface{}) *Cond
- func Le(field string, value interface{}) *Cond
- func Lt(field string, value interface{}) *Cond
- func NotEq(field string, value interface{}) *Cond
- type KVStore
- type ORM
- type Query
- type QueryType
- type Result
- type Sort
- type SortType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteBucket ¶
func RegisterKVHandler ¶
func RegisterKVHandler(h KVStore)
Types ¶
type BoolType ¶
type BoolType string
const Must BoolType = "must"
const MustNot BoolType = "must_not"
const Should BoolType = "should"
type Cond ¶
type KVStore ¶
type KVStore interface {
Open() error
Close() error
GetValue(bucket string, key []byte) ([]byte, error)
GetCompressedValue(bucket string, key []byte) ([]byte, error)
AddValueCompress(bucket string, key []byte, value []byte) error
AddValue(bucket string, key []byte, value []byte) error
DeleteValue(bucket string, key []byte, value []byte) error
DeleteBucket(bucket string, key []byte) error
}
type ORM ¶
type ORM interface {
Save(o interface{}) error
Update(o interface{}) error
Delete(o interface{}) error
Search(t interface{}, to interface{}, q *Query) (error, Result)
Get(o interface{}) error
GetBy(field string, value interface{}, t interface{}, to interface{}) (error, Result)
Count(o interface{}) (int, error)
}
type QueryType ¶
type QueryType string
const Match QueryType = "match"
const RangeGt QueryType = "gt"
const RangeGte QueryType = "gte"
const RangeLt QueryType = "lt"
const RangeLte QueryType = "lte"
Click to show internal directories.
Click to hide internal directories.