Documentation
¶
Index ¶
- Constants
- func Alert400(c *gin.Context, code Code, message string)
- func Alert400WithoutMessage(c *gin.Context, code Code)
- func Alert404Route(router *gin.Engine)
- func Alert500(c *gin.Context, code Code, message string)
- func Alert500WithoutMessage(c *gin.Context, code Code)
- func Fail(c *gin.Context, err error)
- func Parse[T any](c *gin.Context, obj *T) (err error)
- func StatusText(code Code) string
- func Success(c *gin.Context)
- func SuccessWithData(c *gin.Context, data any)
- type Code
- type RequestType
Constants ¶
View Source
const (
PATH = "path"
)
Variables ¶
This section is empty.
Functions ¶
func Alert400WithoutMessage ¶
Alert400WithoutMessage 客户端请求错误 不传具体信息
func Alert500WithoutMessage ¶
Alert500WithoutMessage 系统错误 不传具体信息
func StatusText ¶
Types ¶
type RequestType ¶
type RequestType[T any] struct { // contains filtered or unexported fields }
RequestType is a generic struct that holds the parsed request data
func NewRequestType ¶
func NewRequestType[T any](data T) RequestType[T]
NewRequestType is a constructor function for RequestType
Click to show internal directories.
Click to hide internal directories.