go_dreamfactory/modules/gateway/options.go
2022-06-08 19:10:43 +08:00

24 lines
360 B
Go

package gateway
import (
"go_dreamfactory/lego/utils/mapstructure"
)
/*
网关模块 参数定义
*/
type (
Options struct {
ListenPort int //websocket 监听端口
}
)
//序列化参数对象
func (this *Options) LoadConfig(settings map[string]interface{}) (err error) {
if settings != nil {
err = mapstructure.Decode(settings, this)
}
return
}