Documentation ¶
Index ¶
- func AccessLog(c *gin.Context)
- func CopyReqBody(c *gin.Context)
- func FormatError(c *gin.Context, e *errmsg.ErrMsg)
- func GetAlias(c *gin.Context) string
- func GetAppName(c *gin.Context) string
- func GetBoolQuery(c *gin.Context, query string, defaultValue bool) bool
- func GetCtx(c *gin.Context) context.Context
- func GetDeviceId(c *gin.Context) string
- func GetFloat64Query(c *gin.Context, query string, defaultValue float64) float64
- func GetInt32Path(c *gin.Context, key string) (int32, error)
- func GetInt32Query(c *gin.Context, query string, defaultValue int32) int32
- func GetInt64Path(c *gin.Context, key string) (int64, error)
- func GetInt64Query(c *gin.Context, query string, defaultValue int64) int64
- func GetMeta(c *gin.Context) *model.RequestMeta
- func GetReqBody(c *gin.Context) []byte
- func GetResp(c *gin.Context) string
- func GetTraceId(c *gin.Context) string
- func GetUserId(c *gin.Context) int64
- func OK(c *gin.Context)
- func ParameterError(c *gin.Context)
- func Parse(c *gin.Context)
- func Recovery(c *gin.Context)
- func Ret(c *gin.Context, resp interface{})
- func ServerError(c *gin.Context)
- func SetAlias(c *gin.Context, uri string)
- func SetResp(c *gin.Context, val interface{})
- type Resp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyReqBody ¶
func GetAppName ¶
func GetDeviceId ¶
func GetFloat64Query ¶
func GetReqBody ¶
func GetTraceId ¶
func Parse ¶
需要在nginx设置 server{ set $trace_id "${request_id}"; if ($http_x_atrace_id != "" ){ set $trace_id "${http_x_atrace_id}"; } add_header trace_id $trace_id; #配置反向代理时使用 proxy_set_header x-atrace-id $trace_id; ... }
func ServerError ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.