api

package
v0.0.0-...-c5159e0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseApi

type BaseApi struct{}

func (BaseApi) Failure

func (r BaseApi) Failure(c *gin.Context, code int, err error)

func (BaseApi) FailureOnlyErr

func (r BaseApi) FailureOnlyErr(c *gin.Context, err error)

func (BaseApi) GetParamInt

func (r BaseApi) GetParamInt(c *gin.Context, key string) (int, error)

func (BaseApi) GetParamUint

func (r BaseApi) GetParamUint(c *gin.Context, key string) (uint, error)

func (BaseApi) GetQueryPageInfo

func (r BaseApi) GetQueryPageInfo(c *gin.Context) (entity.PageInfo, error)

func (BaseApi) Success

func (r BaseApi) Success(c *gin.Context, data any)

func (BaseApi) ValidateStruct

func (r BaseApi) ValidateStruct(obj any) error

func (BaseApi) ValidateWithBindJson

func (r BaseApi) ValidateWithBindJson(c *gin.Context, obj any) error

func (BaseApi) ValidateWithBindQuery

func (r BaseApi) ValidateWithBindQuery(c *gin.Context, obj any) error

type CustomValidateMap

type CustomValidateMap map[string]validator.Func

type ResponseJson

type ResponseJson struct {
	Time  time.Time `json:"time"`
	Code  int       `json:"code"`
	Msg   string    `json:"msg"`
	Error string    `json:"error"`
	Data  any       `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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