Documentation ¶ Overview ¶ Copyright 2019-2020 Axetroy. All rights reserved. MIT license. Index ¶ func Response(res *schema.Response, data interface{}, err error) func ResponseList(res *schema.List, data interface{}, meta *schema.Meta, err error) func TrimCode(message string) string type Context func NewContext(c *gin.Context) Context Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Response ¶ func Response(res *schema.Response, data interface{}, err error) func ResponseList ¶ func ResponseList(res *schema.List, data interface{}, meta *schema.Meta, err error) func TrimCode ¶ func TrimCode(message string) string Types ¶ type Context ¶ type Context struct { *gin.Context Uid string `json:"uid"` // 操作人的用户 ID UserAgent string `json:"user_agent"` // 用户代理 Ip string `json:"ip"` // IP地址 } 控制器的上下文 func NewContext ¶ func NewContext(c *gin.Context) Context Source Files ¶ View all Source files context.go response.go Click to show internal directories. Click to hide internal directories.