Versions in this module Expand all Collapse all v1 v1.0.2 Feb 12, 2022 Changes in this version + const GinKeyBodyInterface + const GinKeyReqBody + const GinKeyRspBase + func CommJsonResponse(ctx *gin.Context, err errcode.AppError, data interface{}, errInfo ...string) + func GetReqBodyToStruct(body []byte, appParams interface{}) (interface{}, error) + func MiddlewareRsp(ctx *gin.Context, httpCode int, err errcode.AppError) + func NewReqBody() interface + func NewRspBody() interface + func RegisterProDealFunc(funcs ...FuncCtx) + func RegisterProtocol(protocolFunc func() ProtocolBase) + type FuncCtx func(body []byte, header http.Header) errcode.AppError + func GetDealFuncs() []FuncCtx + type ProtocolBase interface + GetReqAndRspByResBody func(body []byte, appParams interface{}) (RspStructBase, interface{}, error) + GetReqBodyToStruct func(body []byte, appParams interface{}) (interface{}, error) + GetRspByResBody func(body []byte) (RspStructBase, error) + NewReqBody func() interface{} + NewRspBody func() interface{} + type RspStructBase interface + GetBodyInterface func() string + SetData func(data interface{}) + SetRspError func(err errcode.AppError, strErr ...string) + ToString func() string + func GetReqAndRspByResBody(body []byte, appParams interface{}) (RspStructBase, interface{}, error) + func GetRspByResBody(body []byte) (RspStructBase, error)