| | |
| | | import ( |
| | | "basic.com/pubsub/protomsg.git" |
| | | "encoding/json" |
| | | "fmt" |
| | | "strconv" |
| | | ) |
| | | |
| | |
| | | } |
| | | var res Result |
| | | if err = json.Unmarshal(respBody, &res); err != nil { |
| | | fmt.Println(err) |
| | | logPrint(err) |
| | | return taskInfos |
| | | } |
| | | bytes, _ := json.Marshal(res.Data) |
| | |
| | | } |
| | | var res Result |
| | | if err = json.Unmarshal(respBody, &res); err != nil { |
| | | fmt.Println(err) |
| | | logPrint(err) |
| | | return taskInfos |
| | | } |
| | | bytes, _ := json.Marshal(res.Data) |
| | |
| | | } |
| | | m := make(map[string]string,0) |
| | | for _,s := range ti.Sdks{ |
| | | if _,ok :=m[s.IpcId];!ok{ |
| | | m[s.IpcId] = s.IpcId |
| | | if _,ok :=m[s.SdkType];!ok{ |
| | | m[s.SdkType] = s.SdkType |
| | | tsr.Sdks = append(tsr.Sdks,&protomsg.SdkRun{ |
| | | IpcId:s.IpcId, |
| | | SdkType:s.SdkType, |
| | |
| | | } |
| | | var res Result |
| | | if err = json.Unmarshal(respBody, &res); err != nil { |
| | | fmt.Println(err) |
| | | logPrint(err) |
| | | return false,nil |
| | | } |
| | | return res.Success,res.Data |