Documentation ¶
Overview ¶
Description: Author: Michael Cheung Github: https://github.com/gzmichaelcheung Date: 2020-11-23 15:00:22 LastEditors: Michael Cheung LastEditTime: 2020-11-23 15:00:24
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPageOffset ¶
func GetPageSize ¶
Types ¶
type Response ¶
func NewResponse ¶
func (*Response) ToErrorResponse ¶
func (*Response) ToResponse ¶
func (r *Response) ToResponse(data interface{})
func (*Response) ToResponseList ¶
{ "list": { "xxx":"xxx", "yyy":"yyy" },{ "zzz":"zzz" } "pager": { "page": 0, "page_size": 20, "total_rows": 1024 } }
type ValidError ¶
func (*ValidError) Error ¶
func (v *ValidError) Error() string
type ValidErrors ¶
type ValidErrors []*ValidError
func BindAndValid ¶
func BindAndValid(c *gin.Context, v interface{}) (bool, ValidErrors)
func (ValidErrors) Error ¶
func (v ValidErrors) Error() string
func (ValidErrors) Errors ¶
func (v ValidErrors) Errors() []string
Click to show internal directories.
Click to hide internal directories.