Documentation
¶
Index ¶
- type Data
- type Response
- func InternalServerError(message string, err error) Response
- func NotFound(message string) Response
- func Send(code int, message string, data interface{}) Response
- func Success(message string, data interface{}, meta *pagination.Paginator) Response
- func UnAuthenticated(message string) Response
- func ValidationError(message string, err error) Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct { Meta *pagination.Paginator `json:"meta,omitempty"` Item interface{} `json:"item"` Items interface{} `json:"items"` }
type Response ¶
type Response struct { Code int `json:"code"` Message string `json:"message"` Data interface{} `json:"data"` }
func InternalServerError ¶
func Success ¶
func Success(message string, data interface{}, meta *pagination.Paginator) Response
Success 发送成功响应
func ValidationError ¶
Click to show internal directories.
Click to hide internal directories.