go_dreamfactory/modules/gateway/options.go
2022-07-13 15:50:19 +08:00

26 lines
458 B
Go

package gateway
import (
"go_dreamfactory/lego/utils/mapstructure"
)
/*
网关模块 参数定义
*/
type (
Options struct {
Debug bool //日志开关
GinDebug bool //web引擎日志开关
ListenPort int //websocket 监听端口
}
)
// LoadConfig 配置文件序列化为Options
func (this *Options) LoadConfig(settings map[string]interface{}) (err error) {
if settings != nil {
err = mapstructure.Decode(settings, this)
}
return
}