Documentation ¶
Index ¶
- type Controller
- func (c *Controller) DumpRequest() string
- func (c *Controller) GetLoggedUserId() int
- func (c *Controller) GetQueryByMethod(key, defaultValue string) string
- func (c *Controller) GetQueryPostForm(keys ...string) string
- func (c *Controller) Json(args ...interface{})
- func (c *Controller) SetContext(ctx *gin.Context)
- type DbCollector
- type IController
- type Model
- type RdsCollector
- type Redis
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
Controller
func (*Controller) DumpRequest ¶ added in v1.3.0
func (c *Controller) DumpRequest() string
DumpRequest
func (*Controller) GetQueryByMethod ¶
func (c *Controller) GetQueryByMethod(key, defaultValue string) string
根据ctx.httpMethod获取GET或POST参数
func (*Controller) GetQueryPostForm ¶
func (c *Controller) GetQueryPostForm(keys ...string) string
从Get和Post里获取Key的值
func (*Controller) Json ¶
func (c *Controller) Json(args ...interface{})
Json 输出方法 args 三个参数: 第一个是code int,代表状态码 第二个是msg string,代表信息 第三个是data gin.H,代表数据
func (*Controller) SetContext ¶ added in v1.3.0
func (c *Controller) SetContext(ctx *gin.Context)
SetContext
type DbCollector ¶
type DbCollector struct {
// contains filtered or unexported fields
}
type IController ¶ added in v1.3.0
type Model ¶
type Model struct { }
func (*Model) NewClient ¶
func (m *Model) NewClient(dbc *DbCollector, dialect *app.MysqlDialect) *gorm.DB
type RdsCollector ¶
type RdsCollector struct {
// contains filtered or unexported fields
}
type Redis ¶
type Redis struct { }
func (*Redis) NewClient ¶
func (r *Redis) NewClient(rdc *RdsCollector, client *app.RedisClient) *redis.Client
Click to show internal directories.
Click to hide internal directories.