controller

package
v0.0.0-...-70261f9 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseController

type BaseController struct {
	Log *glog.Glogger
}

func NewBaseController

func NewBaseController(svc *svc.ControllerContext) BaseController

func (*BaseController) BindJSONIgnoreCase

func (m *BaseController) BindJSONIgnoreCase(ctx *gin.Context, req interface{}) (err error)

把请求参数转换为小写

func (*BaseController) GetContentUnLogin

func (m *BaseController) GetContentUnLogin(ctx *gin.Context) (*request.Context, error)

func (*BaseController) GetRequestContext

func (m *BaseController) GetRequestContext(ctx *gin.Context) (*request.Context, error)

func (*BaseController) LimitLock

func (m *BaseController) LimitLock(ctx *gin.Context) error

IP限流

func (*BaseController) Response

func (m *BaseController) Response(ctx *gin.Context, code int, msg string, data interface{})

func (*BaseController) Response500

func (m *BaseController) Response500(ctx *gin.Context, res interface{})

func (*BaseController) ResponseError

func (m *BaseController) ResponseError(ctx *gin.Context, err error)

func (*BaseController) ResponseOk

func (m *BaseController) ResponseOk(ctx *gin.Context, data interface{})

func (*BaseController) ShouldBind

func (m *BaseController) ShouldBind(ctx *gin.Context, req interface{}) error

func (*BaseController) ShouldBindJSON

func (m *BaseController) ShouldBindJSON(ctx *gin.Context, req interface{}) error

func (*BaseController) ShouldBindQuery

func (m *BaseController) ShouldBindQuery(ctx *gin.Context, req interface{}) error

type IsValidChecker

type IsValidChecker interface {
	IsValid() error
}

Jump to

Keyboard shortcuts

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