Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseReq ¶
type BaseReq struct {
Context Context `json:"-"` // 這個字段不能修改偏移值 ⚠️ 必须保持第一位
// 字符串字段(16字节)
Cmd string `json:"cmd"`
// 数值字段(8字节对齐)
PrevID int64 `json:"prevID"`
LastID int64 `json:"lastID"`
Offset int64 `json:"offset"`
Limit int64 `json:"limit"`
// bool字段(1字节)
CountQ bool `json:"countQ"`
}
func GetBasePtrReq ¶ added in v1.0.146
func (BaseReq) MarshalEasyJSON ¶ added in v1.1.0
MarshalEasyJSON supports easyjson.Marshaler interface
func (BaseReq) MarshalJSON ¶ added in v1.1.0
MarshalJSON supports json.Marshaler interface
func (*BaseReq) UnmarshalEasyJSON ¶ added in v1.1.0
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*BaseReq) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON supports json.Unmarshaler interface
type Context ¶
type Context struct {
// 8字节字段组 (5个字段)
Identify *Identify // 8字节 - 指针字段
System *System // 8字节 - 指针字段
RedisCacheAware func(ds ...string) (cache.Cache, error) // 8字节 - 函数指针
LocalCacheAware func(ds ...string) (cache.Cache, error) // 8字节 - 函数指针
// 16字节字段组 (2个字段)
Cipher map[int64]crypto.Cipher // 16字节 - slice
Path string // 16字节 - 字符串字段
}
Click to show internal directories.
Click to hide internal directories.