Documentation
¶
Index ¶
- func BadRequest(c *gin.Context, msg string)
- func BindJSON(c *gin.Context, req any) error
- func BindQuery(c *gin.Context, req any) error
- func FormBool(c *gin.Context, key string, def bool) bool
- func FormFloat64(c *gin.Context, key string, def float64) float64
- func FormInt(c *gin.Context, key string, def int) int
- func FormInt64(c *gin.Context, key string, def int64) int64
- func FormString(c *gin.Context, key string, def string) string
- func FormUint64(c *gin.Context, key string, def uint64) uint64
- func GetIDFromPath(c *gin.Context, paramName string) (uint, bool)
- func GetPage(c *gin.Context) (int, int)
- func HealthCheck(c *gin.Context)
- func InternalError(c *gin.Context, msg string)
- func ParseInt(s string, defaultValue int) int
- func PathInt(c *gin.Context, key string, def int) int
- func PathInt64(c *gin.Context, key string, def int64) int64
- func PathUint64(c *gin.Context, key string, def uint64) uint64
- func QueryBool(c *gin.Context, key string, def bool) bool
- func QueryFloat64(c *gin.Context, key string, def float64) float64
- func QueryInt(c *gin.Context, key string, def int) int
- func QueryInt64(c *gin.Context, key string, def int64) int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormFloat64 ¶
FormFloat64 获取 POST 表单参数中的 float64(带默认值)
func FormString ¶
FormString 获取 POST 表单参数中的字符串(带默认值)
func FormUint64 ¶
FormUint64 获取 POST 表单参数中的 uint64(带默认值)
func GetIDFromPath ¶
GetIDFromPath 从路径获取 ID
func HealthCheck ¶
HealthCheck 健康检查 @Summary 健康检查 @Description 检查服务是否正常运行 @Tags 系统 @Accept json @Produce json @Success 200 {object} response.Response @Router /health [get]
func PathUint64 ¶
PathUint64 从路径参数获取 uint64(带默认值)
func QueryFloat64 ¶
QueryFloat64 获取 Query 参数中的 float64(带默认值)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.