Back to godoc.org

Package app

v0.0.0-...-6396397
Latest Go to latest

The latest major version is .

Published: May 5, 2020 | License: MIT | Module: github.com/EDDYCJY/go-gin-example

Index

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

type Gin

type Gin struct {
	C *gin.Context
}

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"`
}

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier