package bhomedbapi import ( "encoding/json" ) type SysRoleApi struct { } func (api SysRoleApi) FindAll() (bool,interface{}) { url := DATA_URL_PREFIX + "/role/findAll" netNode := getNetNode(url2Topic(Topic_System_Service, url)) client := NewClient(WithNodes(netNode)) body, err := client.DoGetRequest(url, nil, nil) if err != nil { return false,nil } var res Result if err = json.Unmarshal(body, &res); err != nil { return false,nil } return true,res.Data }