Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Resource{}
Functions ¶
This section is empty.
Types ¶
type GzconfigStruct ¶
type GzconfigStruct struct { // web:通用;scf:云函数 Mode string // "web" // none(默认),dev、prod、test。分别对应 application-${Active} Active string // mode为scf时必填,作为请求路由前缀 /de Name string Log struct { Level string // "error" Format string Color bool } Server struct { // 如 127.0.0.1 Host string // "" // 如 6150 Port string // "6150" } // 编译配置 Build struct { // 如 windows Goos string // "windows" // amd64 Goarch string // "and64" } // 中间件配置 Middleware struct { Jwt struct { Secret string Lookup string Prex string Ignores []string } } Http struct { Gzip bool } Cache struct { // all cache redis Type string } Datasource struct { Type string Source string MaxIdle int16 OpenIdle int16 } Banner struct { Mode string // off on 隐藏、打印banner 默认on Text string // 自定义banner } }
var GzConfig *GzconfigStruct
声明
func GetConfig ¶
func GetConfig() *GzconfigStruct
type Resource ¶
type Resource struct {
Gz GzconfigStruct
}
Click to show internal directories.
Click to hide internal directories.