Documentation ¶
Index ¶
- Constants
- Variables
- type AtomicInt64
- type BleveIndexes
- func (indexes *BleveIndexes) CreateIndex(namespace string) error
- func (indexes *BleveIndexes) Delete(uri string) error
- func (indexes *BleveIndexes) Index(uri string, value interface{}) error
- func (indexes *BleveIndexes) IndexIfNotExist(uri string, value interface{}) error
- func (indexes *BleveIndexes) Query(namespace string, query interface{}, offset int64, size int64) (int64, []string, error)
- func (indexes *BleveIndexes) RemoveIndex(namespace string) error
- type BoltCoder
- type BoltStore
- func (store *BoltStore) Del(uri string) error
- func (store *BoltStore) DelOBJECT(object OBJECT) error
- func (store *BoltStore) Get(uri string, nested bool) (interface{}, error)
- func (store *BoltStore) GetOBJECT(uri string) (OBJECT, error)
- func (store *BoltStore) Load() error
- func (store *BoltStore) MultiGet(uri string, suffix string, nested bool) ([]interface{}, error)
- func (store *BoltStore) Put(uri string, value interface{}) error
- func (store *BoltStore) PutOBJECT(object OBJECT) error
- func (store *BoltStore) Size(uri string) (int64, error)
- type ByteCoder
- type Cache
- type Indexes
- type MemoryCache
- type Namespace
- func (ns *Namespace) AddObject(obj OBJECT) error
- func (ns *Namespace) Del(key string)
- func (ns *Namespace) DelObject(obj OBJECT)
- func (ns *Namespace) GetBytes(bc ByteCoder) ([]byte, error)
- func (ns *Namespace) GetValue(uri string, ret interface{}) error
- func (ns *Namespace) Key() string
- func (ns *Namespace) MarshalJSON() ([]byte, error)
- func (ns *Namespace) Namespace() string
- func (ns *Namespace) Set(key string, val interface{}) error
- func (ns *Namespace) SetBytes(bc ByteCoder, byts []byte) error
- func (ns *Namespace) SetValue(value interface{}) error
- func (ns *Namespace) Type() OBJECT_TYPE
- func (ns *Namespace) URI() string
- func (ns *Namespace) Value() interface{}
- type OBJECT
- type OBJECT_TYPE
- type Object
- func (obj *Object) GetBytes(bc ByteCoder) ([]byte, error)
- func (obj *Object) GetValue(uri string, ret interface{}) error
- func (obj *Object) Key() string
- func (obj *Object) MarshalJSON() ([]byte, error)
- func (obj *Object) Namespace() string
- func (obj *Object) SetBytes(bc ByteCoder, byts []byte) error
- func (obj *Object) SetValue(value interface{}) error
- func (obj *Object) Type() OBJECT_TYPE
- func (obj *Object) URI() string
- func (obj *Object) Value() interface{}
- type Store
Constants ¶
View Source
const ( OBJECT_T = iota NAMESPACE_T = iota )
Variables ¶
View Source
var CaseSensitive bool = false
View Source
var IndexOffset int = 0
View Source
var IndexParent bool = true
View Source
var IndexSize int = 20
Functions ¶
This section is empty.
Types ¶
type AtomicInt64 ¶
type AtomicInt64 struct {
// contains filtered or unexported fields
}
func NewAtomicInt64 ¶
func NewAtomicInt64(init int64) *AtomicInt64
func (*AtomicInt64) Caculate ¶
func (ai *AtomicInt64) Caculate(delta int64) int64
func (*AtomicInt64) Value ¶
func (ai *AtomicInt64) Value() int64
type BleveIndexes ¶
func NewBleveIndexes ¶
func NewBleveIndexes(indexRoot string, indexName string) *BleveIndexes
func (*BleveIndexes) CreateIndex ¶
func (indexes *BleveIndexes) CreateIndex(namespace string) error
func (*BleveIndexes) Delete ¶
func (indexes *BleveIndexes) Delete(uri string) error
func (*BleveIndexes) Index ¶
func (indexes *BleveIndexes) Index(uri string, value interface{}) error
func (*BleveIndexes) IndexIfNotExist ¶
func (indexes *BleveIndexes) IndexIfNotExist(uri string, value interface{}) error
func (*BleveIndexes) RemoveIndex ¶
func (indexes *BleveIndexes) RemoveIndex(namespace string) error
type BoltStore ¶
type BoltStore struct {
// contains filtered or unexported fields
}
type Indexes ¶
type Indexes interface { CreateIndex(namespace string) error RemoveIndex(namespace string) error Delete(uri string) error Index(uri string, value interface{}) error IndexIfNotExist(uri string, value interface{}) error Query(namespace string, query interface{}, offset int64, size int64) (int64, []string, error) }
type MemoryCache ¶
func NewMutexCache ¶
func NewMutexCache(defaultExpiration time.Duration, cleanupInterval time.Duration) *MemoryCache
func (*MemoryCache) Add ¶
func (c *MemoryCache) Add(k string, v interface{}, exp time.Duration) error
func (*MemoryCache) Delete ¶
func (c *MemoryCache) Delete(k string)
func (*MemoryCache) DeleteExpired ¶
func (c *MemoryCache) DeleteExpired()
func (*MemoryCache) Get ¶
func (c *MemoryCache) Get(k string) (interface{}, bool)
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
func NewNamespace ¶
func (*Namespace) MarshalJSON ¶
implement json marshal only object value
func (*Namespace) Type ¶
func (ns *Namespace) Type() OBJECT_TYPE
type OBJECT ¶
type OBJECT interface { Namespace() string Key() string URI() string Type() OBJECT_TYPE Value() interface{} GetBytes(bc ByteCoder) ([]byte, error) SetBytes(bc ByteCoder, bytes []byte) error SetValue(value interface{}) error GetValue(uri string, ret interface{}) error }
func CreateOBJECTByType ¶
func CreateOBJECTByType(uri string, atype OBJECT_TYPE) (OBJECT, error)
func CreateOBJECTByValue ¶
type OBJECT_TYPE ¶
type OBJECT_TYPE int
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
func NewObjectByURI ¶
func (*Object) MarshalJSON ¶
implement json marshal only object value
func (*Object) Type ¶
func (obj *Object) Type() OBJECT_TYPE
type Store ¶
type Store interface { PutOBJECT(obj OBJECT) error GetOBJECT(uri string) (OBJECT, error) DelOBJECT(obj OBJECT) error Put(uri string, val interface{}) error Get(uri string, nested bool) (interface{}, error) Del(uri string) error MultiGet(uri string, suffix string, nested bool) ([]interface{}, error) Size(uri string) (int64, error) }
Click to show internal directories.
Click to hide internal directories.