config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name     string
	Mode     string
	Timezone string
	RootPath string
}

服务

type AuthorizationConfig

type AuthorizationConfig struct {
	EncryptKey   string
	EncryptIv    string
	ExpectRouter []string
}

authorization 认证配置

type DbConfig

type DbConfig struct {
	Debug           bool
	Host            string
	Charset         string
	Username        string
	Password        string
	Database        string
	TablePrefix     string
	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifeTime int
}

数据库

type JwtConfig

type JwtConfig struct {
	Secret        string
	SigningMethod string
}

type LogConfig

type LogConfig struct {
	SaveLogs bool
	Single   bool
	Level    logrus.Level
	Path     string
	LogName  string
}

日志

type RedisConfig

type RedisConfig struct {
	Network  string
	Address  string
	Password string
	Db       int
}

type ServerConfig

type ServerConfig struct {
	Address      string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	IdleTimeout  time.Duration
}

server服务

type TemplateConfig

type TemplateConfig struct {
	Enable bool
	Path   string
}

模板

Jump to

Keyboard shortcuts

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