Documentation ¶
Index ¶
- func GetAssetPath() string
- func GetLogFormat() string
- func GetLogLevel() log.Lvl
- func GetLogTimeFormat() string
- func GetRootPath() string
- func GetSpecialViewPathList(paths ...string) []string
- func GetViewTmplPath(path string) string
- func GetWisdomFilename() string
- func RootPath(paths ...any) string
- type AppConfig
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSpecialViewPathList ¶
GetSpecialViewPathList 获取一批path地址
func GetViewTmplPath ¶
GetViewTmplPath 视图地址, assets/views/path
Types ¶
type AppConfig ¶
type AppConfig struct { RootPath string `yaml:"root_path"` // 配置文件 Log struct { LogLevel string `yaml:"log_level"` // 日志等级(debug, info, error) LogFormat string `yaml:"log_format"` // 日志格式 LogTimeFormat string `yaml:"log_time_format"` } `yaml:"log"` Assets struct { AssetPath string `yaml:"asset_path"` // 静态资源path ViewPath string `yaml:"view_path"` // 视图资源path } `yaml:"assets"` Wisdom struct { FileType string `yaml:"file_type"` // 后期考虑DB、Http文件 FileName string `yaml:"file_name"` // 文件名称(目前默认为本地文件) } }
AppConfig 应用配置
type ServerConfig ¶
ServerConfig wisdom-httpd服务配置
func ParseConfig ¶
func ParseConfig(filename string) (cfg *ServerConfig, err error)
ParseConfig 解析系统配置
Click to show internal directories.
Click to hide internal directories.