Documentation ¶
Index ¶
- type PageResponse
- type Response
- func Error(errType any, data any) (res *Response)
- func ErrorCus(code int32, msg string, data any) *Response
- func ErrorMsg(msg string) *Response
- func RpcError(err error) *Response
- func RpcRsp(rsp, data any) *Response
- func RpcRspByDataFieldName(rsp, data any, dataFieldName string) *Response
- func Succ() *Response
- func SuccMsg(msg string) *Response
- func Success(msg string, data any) *Response
- func SuccessCus(msg string, data any, extend map[string]string) *Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PageResponse ¶
type Response ¶
type Response struct { Success bool `json:"success"` Code int32 `json:"code"` Msg string `json:"msg,omitempty"` ResponseTime string `json:"responseTime,omitempty"` TraceId string `json:"traceId,omitempty"` Data any `json:"data,omitempty"` Extend map[string]string `json:"extend,omitempty"` }
func RpcRspByDataFieldName ¶
Click to show internal directories.
Click to hide internal directories.