aboutsummaryrefslogtreecommitdiff
path: root/container.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2018-02-19 21:30:33 +0100
committerStefan Majewsky <majewsky@gmx.net>2018-02-19 21:33:49 +0100
commit60d4779889baedc44972d4749daa073efca3b25c (patch)
treed47746971f659d6f7e3affe428f239b289954f5b /container.go
parent8f777460661bbbcbe42730979140f525b382110e (diff)
downloadgo-schwift-60d4779889baedc44972d4749daa073efca3b25c.tar.gz
reorganize code
* Gophercloud dependencies move into subpackage gopherschwift. * Tests move into subpackage tests (to avoid import cycles). + Rename "Client" to "Backend".
Diffstat (limited to 'container.go')
-rw-r--r--container.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/container.go b/container.go
index 1e30eff..741350e 100644
--- a/container.go
+++ b/container.go
@@ -76,7 +76,7 @@ func (c *Container) Headers() (ContainerHeaders, error) {
Method: "HEAD",
ContainerName: c.name,
ExpectStatusCodes: []int{204},
- }.Do(c.a.client)
+ }.Do(c.a.backend)
if err != nil {
return ContainerHeaders{}, err
}
@@ -103,7 +103,7 @@ func (c *Container) Update(headers ContainerHeaders, opts *RequestOptions) error
Headers: headersToHTTP(headers),
Options: opts,
ExpectStatusCodes: []int{204},
- }.Do(c.a.client)
+ }.Do(c.a.backend)
if err == nil {
c.Invalidate()
}
@@ -124,7 +124,7 @@ func (c *Container) Create(headers ContainerHeaders, opts *RequestOptions) error
Options: opts,
ExpectStatusCodes: []int{201, 202},
DrainResponseBody: true,
- }.Do(c.a.client)
+ }.Do(c.a.backend)
if err == nil {
c.Invalidate()
}
@@ -146,7 +146,7 @@ func (c *Container) Delete(headers ContainerHeaders, opts *RequestOptions) error
Headers: headersToHTTP(headers),
Options: opts,
ExpectStatusCodes: []int{204},
- }.Do(c.a.client)
+ }.Do(c.a.backend)
if err == nil {
c.Invalidate()
}
@@ -172,7 +172,7 @@ func (c *Container) EnsureExists() (*Container, error) {
ContainerName: c.name,
ExpectStatusCodes: []int{201, 202},
DrainResponseBody: true,
- }.Do(c.a.client)
+ }.Do(c.a.backend)
return c, err
}