Documentation ¶
Index ¶
- func OnInitialize(configFile string, envPrefix string, loadDirs []string, ...)
- func ReadRequest(c *gin.Context, rq any, bindFn func(any) error) error
- func ShouldBindJSON(c *gin.Context, rq any) error
- func ShouldBindQuery(c *gin.Context, rq any) error
- func ShouldBindUri(c *gin.Context, rq any) error
- func WriteResponse(c *gin.Context, result any, err error)
- type ErrorResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OnInitialize ¶
OnInitialize 设置需要读取的配置文件名、环境变量,并将其内容读取到 viper 中.
func ReadRequest ¶
ReadRequest 绑定参数、调用 Default() 初始化,并处理错误.
Types ¶
Click to show internal directories.
Click to hide internal directories.