config

package
v0.0.0-...-a60b5f4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCons

func GetCons() map[string]Connection

Types

type Connection

type Connection struct {
	mysql.Config
	MaxIdleConns int
	MaxOpenConns int
}

type CookieConfig

type CookieConfig struct {
	NAME string
}

func GetCookieConfig

func GetCookieConfig() *CookieConfig

type Env

type Env struct {
	Debug bool

	Database     mysql.Config
	MaxIdleConns int
	MaxOpenConns int
	ServerPort   string

	RedisIp        string
	RedisPort      string
	RedisPassword  string
	RedisDb        int
	RedisSessionDb int
	RedisCacheDb   int

	SessionKey    string
	SessionSecret string

	AppSecret string

	AccessLog     bool
	AccessLogPath string
	ErrorLog      bool
	ErrorLogPath  string
	InfoLog       bool
	InfoLogPath   string

	SqlLog bool

	TemplatePath string // 静态文件相对路径
}

func GetEnv

func GetEnv() *Env

type JwtConfig

type JwtConfig struct {
	SECRET string
	EXP    time.Duration // 过期时间
	ALG    string        // 算法
}

func GetJwtConfig

func GetJwtConfig() *JwtConfig

Jump to

Keyboard shortcuts

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