package storage //默认配置 func newDefaultConfig() *Config { return &Config{} } type Config struct { Global *Global `json:"global"` Scenes []*Scene `json:"scenes"` } type Global struct { UserCount int32 `json:"UserCount,omitempty"` //用户数 SId string `json:"sid,omitempty"` //区服ID WsAddr string `json:"wsAddr,omitempty"` //websocket addr IntervalS int32 `json:"intervalS,omitempty"` //间隔时间s TimeoutMs int32 `json:"timeoutMs,omitempty"` //超时时间 } type Scene struct { ID string `json:"id,omitempty"` //场景ID Name string `json:"name,omitempty"` //场景名称 Desc string `json:"desc,omitempty"` //描述 Callers []*Caller `json:"callers,omitempty"` //调用器列表 Status uint32 `json:"status,omitempty"` //是否启用 默认0未启用 1是启用 } type Caller struct { ID string `json:"id,omitempty"` //调用器ID Name string `json:"name,omitempty"` //调用器名称 Key string `json:"key,omitempty"` //标识 Num int `json:"num,omitempty"` //顺序号 }