Documentation ¶
Index ¶
Constants ¶
View Source
const ( //TypeMiddleAll 全部操作都允许 TypeMiddleAll = int8(0) //TypeMiddleEncode 只允许编码,后端返回给前端的响应处理 TypeMiddleEncode = int8(1) //TypeMiddleDecode 只允许解码,前端请求后端的请求参数处理 TypeMiddleDecode = int8(2) )
Variables ¶
This section is empty.
Functions ¶
func Response ¶
func Response(data interface{}, err error, r ResponseRender, i IMiddleware)
Response response handler
Types ¶
type Aggregate ¶
type Aggregate struct { Hitn string `json:"hitn"` //name的多个结构体用.表示分级 Hitv string `json:"hitv"` //枚举值 Mapn string `json:"mapn"` //映射字段名,可以与hitname不同,也可以相同 Mapv string `json:"mapv"` //映射字段值 Delimiter string `json:"delimiter"` //映射字段值的分隔符号 Order int64 `json:"order"` //顺序 Type int8 `json:"type"` }
Aggregate 前端映射结构,对应于前后端交互的字段
type MiddleAggregate ¶
MiddleAggregate 处理聚合逻辑
func (*MiddleAggregate) Process ¶
func (m *MiddleAggregate) Process(data interface{})
Process handle multi aggregate logists
Click to show internal directories.
Click to hide internal directories.