Back to

Package mvcs

Latest Go to latest

The latest major version is .

Published: Sep 21, 2020 | License: MIT | Module:



const (
	Dialect = "charset=utf8&loc=PRC&parseTime=true&maxAllowedPacket=0&timeout=10s"

type Controller

type Controller struct {
	Ctx *gin.Context

Controller 基类

func (*Controller) GetLoggedUserId

func (c *Controller) GetLoggedUserId() int


func (*Controller) GetQueryByMethod

func (c *Controller) GetQueryByMethod(key, defaultValue string) string


func (*Controller) GetQueryPostForm

func (c *Controller) GetQueryPostForm(keys ...string) string


func (*Controller) Json

func (c *Controller) Json(args ...interface{})

Json 输出方法 args 三个参数: 第一个是code int,代表状态码 第二个是msg string,代表信息 第三个是data gin.H,代表数据

type DbCollector

type DbCollector struct {
	// contains filtered or unexported fields

type Model

type Model struct {

func (*Model) GetTest

func (m *Model) GetTest() *gorm.DB

func (*Model) NewClient

func (m *Model) NewClient(dbc *DbCollector, dialect *app.MysqlDialect) *gorm.DB

func (*Model) SetMaxOpenConns

func (m *Model) SetMaxOpenConns(db *gorm.DB, num int)

type RdsCollector

type RdsCollector struct {
	// contains filtered or unexported fields

type Redis

type Redis struct {

func (*Redis) GetCache

func (r *Redis) GetCache() *redis.Client

func (*Redis) NewClient

func (r *Redis) NewClient(rdc *RdsCollector, client *app.RedisClient) *redis.Client

type Service

type Service struct {

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier