Update github.com/xenolf/lego to 0.4.1
This commit is contained in:
parent
5042c5bf40
commit
e8d63b2a3b
105 changed files with 4299 additions and 2075 deletions
36
vendor/github.com/exoscale/egoscale/async.go
generated
vendored
Normal file
36
vendor/github.com/exoscale/egoscale/async.go
generated
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
package egoscale
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
func (exo *Client) PollAsyncJob(jobid string) (*QueryAsyncJobResultResponse, error) {
|
||||
params := url.Values{}
|
||||
|
||||
params.Set("jobid", jobid)
|
||||
|
||||
resp, err := exo.Request("queryAsyncJobResult", params)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var r QueryAsyncJobResultResponse
|
||||
|
||||
if err := json.Unmarshal(resp, &r); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &r, nil
|
||||
}
|
||||
|
||||
func (exo *Client) AsyncToVirtualMachine(resp QueryAsyncJobResultResponse) (*DeployVirtualMachineResponse, error) {
|
||||
var r DeployVirtualMachineWrappedResponse
|
||||
|
||||
if err := json.Unmarshal(resp.Jobresult, &r); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &r.Wrapped, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue