Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Name string `env-required:"true" yaml:"name" env:"APP_NAME"` Version string `env-required:"true" yaml:"version" env:"APP_VERSION"` }
App 服务配置
type Config ¶
type Config struct { App `yaml:"app"` HTTP `yaml:"http"` Log `yaml:"logger"` DB `yaml:"db"` Oss `yaml:"oss"` }
Config 根结点
type DB ¶
type DB struct { Username string `env-required:"true" yaml:"username" env:"DB_USERNAME"` Password string `env-required:"true" yaml:"password" env:"DB_PASSWORD"` Host string `env-required:"true" yaml:"host" env:"DB_HOST"` Port uint32 `env-required:"true" yaml:"port" env:"DB_PORT"` DbName string `env-required:"true" yaml:"db_name" env:"DB_DB_NAME"` Timeout string `env-required:"true" yaml:"timeout" env:"DB_TIMEOUT"` }
DB 数据库配置
type HTTP ¶
type HTTP struct { IP string `env-required:"true" yaml:"ip" env:"HTTP_IP"` Port uint32 `env-required:"true" yaml:"port" env:"HTTP_PORT"` }
HTTP http配置
Click to show internal directories.
Click to hide internal directories.