Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Bootstrap = &bootstrap{}
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { Name string // 服务名 Version string // 版本号 Server struct { Http Transport Rpc Transport } ServiceKV map[string]any `yaml:"serviceKV"` // 业务自定义kv }
App 应用服务相关配置信息
type Configuration ¶
type Configuration struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Configuration
func (*Configuration) App ¶
func (c *Configuration) App() App
func (*Configuration) AppServiceKV ¶
func (c *Configuration) AppServiceKV() map[string]any
func (*Configuration) Config ¶
func (c *Configuration) Config() config
func (*Configuration) Database ¶
func (c *Configuration) Database() Database
func (*Configuration) Log ¶
func (c *Configuration) Log() Log
func (*Configuration) Redis ¶
func (c *Configuration) Redis() Redis
type FileMetadata ¶
type Log ¶
type Log struct { Level string // 日志级别 默认值是 info FileSizeMax uint16 `yaml:"fileSizeMax"` // 单位是MB 默认值是 10MB FileAgeMax uint16 `yaml:"fileAgeMax"` // 留存天数 DirPath string `validator:"dir" yaml:"dirPath"` // 日志文件夹路径 默认 ./logs }
Log config model
日志文件名 xxx/logs/${App.Service}-2006-01-01-150405.log
Click to show internal directories.
Click to hide internal directories.