forked from p53841790/wheat-cache
feat(struct): init struct interface
This commit is contained in:
parent
087bec4861
commit
781fc4b6b7
|
@ -0,0 +1 @@
|
||||||
|
package define
|
|
@ -0,0 +1,22 @@
|
||||||
|
package define
|
||||||
|
|
||||||
|
type CacheValue interface {
|
||||||
|
LengthByte() int64
|
||||||
|
}
|
||||||
|
|
||||||
|
type ParseComm func(comm string) ([]string, error)
|
||||||
|
|
||||||
|
type CacheStruct interface {
|
||||||
|
SizeByte() int64
|
||||||
|
|
||||||
|
// RollBack 事务相关
|
||||||
|
RollBack() error
|
||||||
|
Begin() error
|
||||||
|
Comment() error
|
||||||
|
|
||||||
|
ParseCommend(comm ParseComm) ([]string, error)
|
||||||
|
GetValue(opt ...string) CacheValue
|
||||||
|
SetValue(opt ...string) error
|
||||||
|
|
||||||
|
Encode() ([]byte, error)
|
||||||
|
}
|
Loading…
Reference in New Issue