app

package
v0.0.0-...-6c48682 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HttpServerAddr *string
	Engine         *gin.Engine
	Logger         *zap.Logger
	RobotEnable    bool
	DebugStack     bool
)
View Source
var (
	Name                  = "gin"
	Version               = "1.0.0"
	HttpServerDefaultAddr = "0.0.0.0:9010"
	LogDir                = "/apps/logs/go/gin"
	ErrorRobotToken       = ""
	GracefulRobotToken    = ""
	TokenKey              = ""
)
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,
}
View Source
var (
	TestMysql = &MysqlDialect{
		Host: os.Getenv("mysql_test_host"),
		User: os.Getenv("mysql_test_username"),
		Pwd:  os.Getenv("mysql_test_password"),
		Db:   os.Getenv("mysql_test_database"),
		Port: os.Getenv("mysql_test_port"),
	}
)
View Source
var (
	TestRedis = &RedisClient{
		Host: os.Getenv("redis_test_host"),
		Port: os.Getenv("redis_test_port"),
		Pwd:  os.Getenv("redis_test_password"),
		Db:   0,
	}
)

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