Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindAndValid

func BindAndValid(c *gin.Context, form interface{}) (int, int)

BindAndValid binds and validates data

func MarkErrors

func MarkErrors(errors []*validation.Error)

MarkErrors logs error logs

Types

type Gin

type Gin struct {
	C *gin.Context
}

Gin ...

func (*Gin) Response

func (g *Gin) Response(httpCode, errCode int, data interface{})

Response setting gin.JSON

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Response ...