package dbapi import ( "basic.com/pubsub/protomsg.git" "encoding/json" ) type SysSetApi struct { } func (api SysSetApi) GetServerInfo() (flag bool,sysconf protomsg.LocalConfig){ url := BASIC_URL + DATA_URL_PREFIX + "/sysset/getServerInfo" client := NewClient() body, err := client.DoGetRequest(url, nil, nil) if err != nil { return false, sysconf } var res Result if err = json.Unmarshal(body, &res); err != nil { return false, sysconf } b, err := json.Marshal(res.Data) if err !=nil { return false,sysconf } else { err = json.Unmarshal(b, &sysconf) if err !=nil { return false,sysconf } else { return true,sysconf } } } //保存轮询配置 func (api SysSetApi) SavePollConfig(paramBody map[string]interface{}) bool{ return false } //获取轮询配置 func (api SysSetApi) GetPollConfig() (bool,interface{}) { return false,nil }