out

package
v2.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

* * @Author: TheLife * @Date: 2020-2-25 9:00 下午

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleError

func HandleError(c *gin.Context, err error) bool

func HandleErrorData

func HandleErrorData(c *gin.Context, data interface{}, err error) bool

func JsonData

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

func JsonError

func JsonError(c *gin.Context, msg string, code ...ErrCode)

func JsonErrorData

func JsonErrorData(c *gin.Context, data interface{}, msg string, code ...ErrCode)

func JsonSuccess

func JsonSuccess(c *gin.Context)

success

func ParseParamID

func ParseParamID(c *gin.Context) (uint, error)

func ParseParamIDString

func ParseParamIDString(c *gin.Context) string

Types

type ErrCode added in v2.1.0

type ErrCode int

fail

type Result added in v2.1.0

type Result struct {
	Code ErrCode     `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