feat(struct): init struct interface

This commit is contained in:
bandl 2021-08-29 22:18:07 +08:00
parent 087bec4861
commit 781fc4b6b7
2 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1 @@
package define

View File

@ -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)
}