package
Version:
v0.7.9
Opens a new window with list of versions in this module.
Published: Feb 21, 2024
License: AGPL-3.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
const (
DefaultTmpPath = "tmp"
DefaultTaskTmpPath = "tasks"
UploadPath = "upload"
PluginPath = "plugin"
)
type App struct {
Name string `yaml:"name"`
Addr string `yaml:"addr"`
Port int `yaml:"port"`
Mode string `yaml:"mode"`
RunStart bool `yaml:"run_start"`
DataPath string `yaml:"data_path"`
TempDate time.Duration `yaml:"temp_date"`
Logger string `yaml:"logger"`
}
type Conf struct {
Db DB `yaml:"db"`
App App `yaml:"app"`
}
NewServerConfig 加载优先级路径 > 当前目录的config.yaml > 打包在可执行文件里的config.yaml.example
type DB struct {
Driver string `yaml:"driver"`
UserName string `yaml:"user"`
PassWord string `yaml:"password"`
Dsn string `yaml:"dsn"`
DbName string `yaml:"db_name"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.