diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2024-07-08 15:46:38 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2024-07-08 15:58:48 +0200 |
| commit | f874c88ee641881229b74bc5afa8f2490120d91b (patch) | |
| tree | b659e602831cefdea385dd021d45501c1c29c6d2 /object.go | |
| parent | 4fac97b5e944ce70cdca3679f5c2b1eef9b83952 (diff) | |
| download | go-schwift-f874c88ee641881229b74bc5afa8f2490120d91b.tar.gz | |
add ctx argument to Account.Capabilities
Diffstat (limited to 'object.go')
| -rw-r--r-- | object.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -647,13 +647,13 @@ func contains(s []string, e string) bool { // hdr := NewContainerHeaders() // hdr.TempURLKey().Set(key) // c := o.Container() -// err := c.Update(hdr, nil) +// err := c.Update(ctx, hdr, nil) // // //...we can use it to generate temporary URLs. -// url := o.TempURL(key, "GET", time.Now().Add(10 * time.Minute)) +// url := o.TempURL(ctx, key, "GET", time.Now().Add(10 * time.Minute)) // resp, err := http.Get(url) // //This time, resp.StatusCode == 200 because the URL includes a token. -func (o *Object) TempURL(key, method string, expires time.Time) (string, error) { +func (o *Object) TempURL(ctx context.Context, key, method string, expires time.Time) (string, error) { urlStr, err := o.URL() if err != nil { return "", err @@ -663,7 +663,7 @@ func (o *Object) TempURL(key, method string, expires time.Time) (string, error) return "", err } - capabilities, err := o.c.a.Capabilities() + capabilities, err := o.c.a.Capabilities(ctx) if err != nil { return "", err } |
