config

package
v0.0.0-...-07bc221 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	C           *Config
	Server      ServerConfig
	Redis       RedisConfig
	Mysql       MysqlConfig
	Smtp        SmtpConfig
	Aliyun      AliyunConfig
	Jwt         JwtConfig
	Developer   DeveloperConfig
	RedisPrefix string
)

Functions

This section is empty.

Types

type AliyunConfig

type AliyunConfig struct {
	Domain       string `yaml:"Domain"`
	Region       string `yaml:"Region"`
	Version      string `yaml:"Version"`
	AccessKey    string `yaml:"AccessKey"`
	AccessSecret string `yaml:"AccessSecret"`
	Email        string `yaml:"Email"`
}

type Config

type Config struct {
	ServerConfig    `yaml:"Server"`
	RedisConfig     `yaml:"Redis"`
	MysqlConfig     `yaml:"Mysql"`
	SmtpConfig      `yaml:"Smtp"`
	AliyunConfig    `yaml:"Aliyun"`
	JwtConfig       `yaml:"Jwt"`
	DeveloperConfig `yaml:"Developer"`
}

type DeveloperConfig

type DeveloperConfig struct {
	AppLimit int `yaml:"AppLimit"`
}

type JwtConfig

type JwtConfig struct {
	Secret string `yaml:"Secret"`
}

type MysqlConfig

type MysqlConfig struct {
	Addr        string `yaml:"Address"`
	User        string `yaml:"Username"`
	Pwd         string `yaml:"Password"`
	Db          string `yaml:"Database"`
	Charset     string `yaml:"Charset"`
	MaxOpen     int    `yaml:"MaxOpen"`
	MaxIdle     int    `yaml:"MaxIdle"`
	MaxLifetime int    `yaml:"MaxLifetime"`
}

type RedisConfig

type RedisConfig struct {
	Addr       string `yaml:"Address"`
	Pwd        string `yaml:"Password"`
	Db         int    `yaml:"Database"`
	Prefix     string `yaml:"Prefix"`
	MinIdle    int    `yaml:"MinIdle"`
	MaxIdle    int    `yaml:"MaxIdle"`
	MaxActive  int    `yaml:"MaxActive"`
	MaxRetries int    `yaml:"MaxRetries"`
}

type ServerConfig

type ServerConfig struct {
	Addr     string `yaml:"Address"`
	Debug    bool   `yaml:"Debug"`
	Log      bool   `yaml:"Log"`
	Title    string `yaml:"Title"`
	Name     string `yaml:"ServerName"`
	FrontUrl string `yaml:"FrontUrl"`
}

type SmtpConfig

type SmtpConfig struct {
	Host   string `yaml:"Host"`
	Port   int    `yaml:"Port"`
	Secure bool   `yaml:"Secure"`
	User   string `yaml:"Username"`
	Pwd    string `yaml:"Password"`
}

Jump to

Keyboard shortcuts

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