Documentation ¶
Overview ¶
*
- @Author: DollarKillerX
- @Description: engine.go
- @Github: https://github.com/dollarkillerx
- @Date: Create in 下午2:30 2019/12/18
Index ¶
- type Collection
- func (c *Collection) Flush() error
- func (c *Collection) Get(key string, value interface{}) error
- func (c *Collection) Has(key string) bool
- func (c *Collection) List() ([]string, error)
- func (c *Collection) Put(key string, value interface{}) error
- func (c *Collection) Remove(key string) error
- func (c *Collection) TotalItem() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct {
// contains filtered or unexported fields
}
Collection describes a collection of key value pairs
func (*Collection) Flush ¶
func (c *Collection) Flush() error
Flush delete a collection with its value
func (*Collection) Get ¶
func (c *Collection) Get(key string, value interface{}) error
Get retrieve a value from collection by key
func (*Collection) Has ¶
func (c *Collection) Has(key string) bool
Has check a key exist in the collection
func (*Collection) List ¶
func (c *Collection) List() ([]string, error)
List fetch all items key in collection
func (*Collection) Put ¶
func (c *Collection) Put(key string, value interface{}) error
Put store a new key with value in the collection
func (*Collection) Remove ¶
func (c *Collection) Remove(key string) error
Remove delete a key from collection
func (*Collection) TotalItem ¶
func (c *Collection) TotalItem() int
TotalItem return total item count
Click to show internal directories.
Click to hide internal directories.