package
Version:
v0.0.0-...-cfca2e5
Opens a new window with list of versions in this module.
Published: Dec 23, 2023
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type App struct {
Name string ` yaml:"name" env:"APP_NAME"`
Version string ` yaml:"version" env:"APP_VERSION"`
}
App -.
type Config struct {
App `yaml:"server-cmd"`
HTTP `yaml:"http"`
Log `yaml:"logger"`
PG `yaml:"postgres"`
JWT `yaml:"jwt"`
WeChat `yaml:"we-chat"`
File `yaml:"file"`
}
Config -.
NewConfig returns server-cmd config.
type File struct {
RootDir string `yaml:"root_dir" env:"FILE_ROOT_DIR"`
}
File -.
type HTTP struct {
Port string ` yaml:"port" env:"HTTP_PORT"`
}
HTTP -.
type JWT struct {
Secret string `yaml:"secret" env:"JWT_SECRET"`
Expire int `yaml:"expire" env:"JWT_EXPIRE"`
}
JWT -.
type Log struct {
Level string ` yaml:"log_level" env:"LOG_LEVEL"`
}
Log -.
type PG struct {
PoolMax int `yaml:"pool_max" env:"PG_POOL_MAX" `
URL string ` env:"PG_URL"`
}
PG -.
type WeChat struct {
AppID string `yaml:"app_id" env:"WECHAT_APP_ID"`
AppSecret string `yaml:"app_secret" env:"WECHAT_APP_SECRET"`
Token string `yaml:"token" env:"WECHAT_TOKEN"`
Encoding string `yaml:"encoding" env:"WECHAT_ENCODING"`
}
WeChat -.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.