mirror of
https://github.com/mudler/luet.git
synced 2025-09-03 00:06:36 +00:00
Update vendor
This commit is contained in:
10
vendor/github.com/fsouza/go-dockerclient/swarm_secrets.go
generated
vendored
10
vendor/github.com/fsouza/go-dockerclient/swarm_secrets.go
generated
vendored
@@ -46,7 +46,7 @@ func (c *Client) CreateSecret(opts CreateSecretOptions) (*swarm.Secret, error) {
|
||||
return nil, err
|
||||
}
|
||||
path := "/secrets/create?" + queryString(opts)
|
||||
resp, err := c.do("POST", path, doOptions{
|
||||
resp, err := c.do(http.MethodPost, path, doOptions{
|
||||
headers: headers,
|
||||
data: opts.SecretSpec,
|
||||
forceJSON: true,
|
||||
@@ -76,7 +76,7 @@ type RemoveSecretOptions struct {
|
||||
// See https://goo.gl/Tqrtya for more details.
|
||||
func (c *Client) RemoveSecret(opts RemoveSecretOptions) error {
|
||||
path := "/secrets/" + opts.ID
|
||||
resp, err := c.do("DELETE", path, doOptions{context: opts.Context})
|
||||
resp, err := c.do(http.MethodDelete, path, doOptions{context: opts.Context})
|
||||
if err != nil {
|
||||
if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
|
||||
return &NoSuchSecret{ID: opts.ID}
|
||||
@@ -109,7 +109,7 @@ func (c *Client) UpdateSecret(id string, opts UpdateSecretOptions) error {
|
||||
}
|
||||
params := make(url.Values)
|
||||
params.Set("version", strconv.FormatUint(opts.Version, 10))
|
||||
resp, err := c.do("POST", "/secrets/"+id+"/update?"+params.Encode(), doOptions{
|
||||
resp, err := c.do(http.MethodPost, "/secrets/"+id+"/update?"+params.Encode(), doOptions{
|
||||
headers: headers,
|
||||
data: opts.SecretSpec,
|
||||
forceJSON: true,
|
||||
@@ -130,7 +130,7 @@ func (c *Client) UpdateSecret(id string, opts UpdateSecretOptions) error {
|
||||
// See https://goo.gl/dHmr75 for more details.
|
||||
func (c *Client) InspectSecret(id string) (*swarm.Secret, error) {
|
||||
path := "/secrets/" + id
|
||||
resp, err := c.do("GET", path, doOptions{})
|
||||
resp, err := c.do(http.MethodGet, path, doOptions{})
|
||||
if err != nil {
|
||||
if e, ok := err.(*Error); ok && e.Status == http.StatusNotFound {
|
||||
return nil, &NoSuchSecret{ID: id}
|
||||
@@ -158,7 +158,7 @@ type ListSecretsOptions struct {
|
||||
// See https://goo.gl/DwvNMd for more details.
|
||||
func (c *Client) ListSecrets(opts ListSecretsOptions) ([]swarm.Secret, error) {
|
||||
path := "/secrets?" + queryString(opts)
|
||||
resp, err := c.do("GET", path, doOptions{context: opts.Context})
|
||||
resp, err := c.do(http.MethodGet, path, doOptions{context: opts.Context})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user