Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct { Code int32 `json:"code"` Message string `json:"message,omitempty"` Data any `json:"data,omitempty"` Error any `json:"error,omitempty"` HttpCode int `json:"-"` // contains filtered or unexported fields }
func ResultFail ¶
func ResultFail(code int32, msg any, options ...ResponseResultOptions) *Response
type ResponseResultOptions ¶
type ResponseResultOptions func(response *Response)
func ResultWithData ¶
func ResultWithData(data any) ResponseResultOptions
func ResultWithError ¶
func ResultWithError(error any) ResponseResultOptions
func ResultWithHttpCode ¶
func ResultWithHttpCode(code int) ResponseResultOptions
func ResultWithMsg ¶
func ResultWithMsg(msg any) ResponseResultOptions
Click to show internal directories.
Click to hide internal directories.