github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/apigw/v2/gateway/QueryProgress.go (about) 1 package gateway 2 3 import ( 4 "github.com/opentelekomcloud/gophertelekomcloud" 5 "github.com/opentelekomcloud/gophertelekomcloud/internal/extract" 6 ) 7 8 func QueryProgress(client *golangsdk.ServiceClient, id string) (*Progress, error) { 9 raw, err := client.Get(client.ServiceURL("apigw", "instances", id, "progress"), nil, nil) 10 if err != nil { 11 return nil, err 12 } 13 14 var res Progress 15 16 err = extract.Into(raw.Body, &res) 17 return &res, err 18 } 19 20 type Progress struct { 21 Progress int `json:"progress"` 22 Status string `json:"status"` 23 ErrorCode string `json:"error_code"` 24 ErrorMsg string `json:"error_msg"` 25 StartTime int64 `json:"start_time"` 26 EndTime int64 `json:"end_time"` 27 }