api

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PageSize = 10

Functions

func BindAndValid

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

func LogErrors

func LogErrors(errors []*validation.Error)

func PageNum

func PageNum(c *gin.Context) int

func Response

func Response(c *gin.Context, httpCode, errCode int, data interface{})

Types

type Resp

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL