gin

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: MulanPSL-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct{}

func (*Handler) GetFormFile

func (th *Handler) GetFormFile(c *gin.Context, key string) (multipart.File, *multipart.FileHeader, error)

GetFormFile 获取file

func (*Handler) GetParam

func (th *Handler) GetParam(c *gin.Context, key string) string

GetParam 获取参数

func (*Handler) GetQueryDefault

func (th *Handler) GetQueryDefault(c *gin.Context, key string, defaultVal string) string

GetQueryDefault 获取参数(带默认)

func (*Handler) Send

func (th *Handler) Send(c *gin.Context, data interface{}, r ecode.BizErr)

Send GetDefault 默认

func (*Handler) SendErr

func (th *Handler) SendErr(c *gin.Context, data interface{}, err ecode.BizErr)

SendErr GetErrRes 失败返回

func (*Handler) SendError

func (th *Handler) SendError(c *gin.Context, err error, bizerr ecode.BizErr)

func (*Handler) SendSucc

func (th *Handler) SendSucc(c *gin.Context, data interface{}, err ecode.BizErr)

SendSucc GetSuccRes 成功返回

Directories

Path Synopsis
middleware
jwt

Jump to

Keyboard shortcuts

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