app

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2021 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

	Name                  = "zgin"
	Version               = "1.0.0"
	VersionKey            = "app_version"
	HttpServerDefaultAddr = "0.0.0.0:9999"
	LogDir                = "/apps/logs/go/zgin"

	ErrorRobotToken                 = ""
	GracefulRobotToken              = ""
	TokenKey                        = ""
	SignTimeExpiration        int64 = 60
	DevModeSign                     = "hxs-gin-dev"
	LogMaxTimeout                   = 3 * time.Second
	SendMaxTimeout                  = 5 * time.Second
	HttpServerReadTimeout           = 10 * time.Second
	HttpServerWriteTimeout          = 15 * time.Second
	HttpServerShutDownTimeout       = 15 * time.Second
)
View Source
var Session = &SessionConfig{
	TokenKey:       "sess_token",
	DataKey:        "gin-gonic/gin/sessdata",
	UpdateDuration: 30 * time.Minute,
	Expiration:     6 * 30 * 86400,
}

Functions

This section is empty.

Types

type MysqlDialect

type MysqlDialect struct {
	User, Pwd, Host, Port, Db                          string
	Charset, Loc, ParseTime, MaxAllowedPacket, Timeout string
}

type RedisClient

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

type SessionConfig

type SessionConfig struct {
	TokenKey       string
	DataKey        string
	Expiration     int64
	UpdateDuration time.Duration
	GetClientFunc  func() *redis.Client
}

Jump to

Keyboard shortcuts

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