app

package
v0.0.0-...-46fca04 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT, MIT Imports: 5 Imported by: 0

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 Error

func Error(c *gin.Context, code int, err error)

func MarkErrors

func MarkErrors(errors []*validation.Error)

MarkErrors logs error logs

func Success

func Success(c *gin.Context, data interface{})

Types

type Gin

type Gin struct {
	C *gin.Context
}

type Response

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

Jump to

Keyboard shortcuts

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