app

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpServerAddr *string
	Engine         *gin.Engine
	Logger         *zap.Logger
	RobotEnable    bool

	Name                            = "zgin"
	Version                         = "0.0.0"
	HttpServerDefaultAddr           = "0.0.0.0:9010"
	LogDir                          = "/apps/logs/go/zgin"
	ErrorRobotToken                 = ""
	GracefulRobotToken              = ""
	TokenKey                        = ""
	SignTimeExpiration        int64 = 60
	DevModeSign                     = "hxs-gin-dev"
	LogMaxTimeout                   = 3 * time.Second
	SendMaxTimeout                  = 5 * time.Second
	HttpServerShutDownTimeout       = 15 * time.Second
	HttpServerWaitTimeout           = 10 * time.Second
)
View Source
var Session = &SessionConfig{
	TokenKey:       "gin-gonic/gin/sesstoken",
	DataKey:        "gin-gonic/gin/sessdata",
	LoggedUidKey:   "gin-gonic/gin/loggeduserid",
	UpdateDuration: 5 * time.Minute,
	Expiration:     6 * 30 * 86400,
}

Functions

This section is empty.

Types

type MysqlDialect

type MysqlDialect struct {
	User, Pwd, Host, Port, Db string
}

type RedisClient

type RedisClient struct {
	Host, Port, Pwd string
	Db              int
}

type SessionConfig

type SessionConfig struct {
	Client                          *redis.Client
	TokenKey, DataKey, LoggedUidKey string
	UpdateDuration                  time.Duration
	Expiration                      int64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL