-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
Using a new version of cloudstack I need recieve de error json: cannot unmarshal string into Go struct field CreateAccountResponse.accounttype of type int
The issue is in the struct
type CreateAccountResponse struct {
Accountdetails map[string]string `json:"accountdetails"`
Accounttype int `json:"accounttype"` <-- new api return as string
Apikeyaccess string `json:"apikeyaccess"`
Backupavailable string `json:"backupavailable"`
Backuplimit string `json:"backuplimit"`
Backupstorageavailable string `json:"backupstorageavailable"`
Backupstoragelimit string `json:"backupstoragelimit"`
Backupstoragetotal int64 `json:"backupstoragetotal"`
Backuptotal int64 `json:"backuptotal"`
Bucketavailable string `json:"bucketavailable"`
Bucketlimit string `json:"bucketlimit"`
Buckettotal int64 `json:"buckettotal"`
Cpuavailable string `json:"cpuavailable"`
Cpulimit string `json:"cpulimit"`
Cputotal int64 `json:"cputotal"`
Created string `json:"created"`
Defaultzoneid string `json:"defaultzoneid"`
Domain string `json:"domain"`
Domainid string `json:"domainid"`
Domainpath string `json:"domainpath"`
Gpuavailable string `json:"gpuavailable"`
Gpulimit string `json:"gpulimit"`
Gputotal int64 `json:"gputotal"`
Groups []string `json:"groups"`
Icon interface{} `json:"icon"`
Id string `json:"id"`
Ipavailable string `json:"ipavailable"`
Iplimit string `json:"iplimit"`
Iptotal int64 `json:"iptotal"`
Iscleanuprequired bool `json:"iscleanuprequired"`
Isdefault bool `json:"isdefault"`
JobID string `json:"jobid"`
Jobstatus int `json:"jobstatus"`
Memoryavailable string `json:"memoryavailable"`
Memorylimit string `json:"memorylimit"`
Memorytotal int64 `json:"memorytotal"`
Name string `json:"name"`
Networkavailable string `json:"networkavailable"`
Networkdomain string `json:"networkdomain"`
Networklimit string `json:"networklimit"`
Networktotal int64 `json:"networktotal"`
Objectstorageavailable string `json:"objectstorageavailable"`
Objectstoragelimit string `json:"objectstoragelimit"`
Objectstoragetotal int64 `json:"objectstoragetotal"`
Primarystorageavailable string `json:"primarystorageavailable"`
Primarystoragelimit string `json:"primarystoragelimit"`
Primarystoragetotal int64 `json:"primarystoragetotal"`
Projectavailable string `json:"projectavailable"`
Projectlimit string `json:"projectlimit"`
Projecttotal int64 `json:"projecttotal"`
Receivedbytes int64 `json:"receivedbytes"`
Roleid string `json:"roleid"`
Rolename string `json:"rolename"`
Roletype string `json:"roletype"`
Secondarystorageavailable string `json:"secondarystorageavailable"`
Secondarystoragelimit string `json:"secondarystoragelimit"`
Secondarystoragetotal float64 `json:"secondarystoragetotal"`
Sentbytes int64 `json:"sentbytes"`
Snapshotavailable string `json:"snapshotavailable"`
Snapshotlimit string `json:"snapshotlimit"`
Snapshottotal int64 `json:"snapshottotal"`
State string `json:"state"`
Taggedresources []string `json:"taggedresources"`
Templateavailable string `json:"templateavailable"`
Templatelimit string `json:"templatelimit"`
Templatetotal int64 `json:"templatetotal"`
User []CreateAccountResponseUser `json:"user"`
Vmavailable string `json:"vmavailable"`
Vmlimit string `json:"vmlimit"`
Vmrunning int `json:"vmrunning"`
Vmstopped int `json:"vmstopped"`
Vmtotal int64 `json:"vmtotal"`
Volumeavailable string `json:"volumeavailable"`
Volumelimit string `json:"volumelimit"`
Volumetotal int64 `json:"volumetotal"`
Vpcavailable string `json:"vpcavailable"`
Vpclimit string `json:"vpclimit"`
Vpctotal int64 `json:"vpctotal"`
}```Metadata
Metadata
Assignees
Labels
No labels