forked from TrueCloudLab/rclone
vendor: update all dependencies
This commit is contained in:
parent
61ff7306ae
commit
696d012c05
952 changed files with 121647 additions and 34334 deletions
10
vendor/github.com/ncw/swift/.travis.yml
generated
vendored
10
vendor/github.com/ncw/swift/.travis.yml
generated
vendored
|
@ -13,18 +13,20 @@ go:
|
|||
- 1.10.x
|
||||
- 1.11.x
|
||||
- 1.12.x
|
||||
- 1.13.x
|
||||
- 1.14.x
|
||||
- master
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- go: 1.12.x
|
||||
- go: 1.14.x
|
||||
env: TEST_REAL_SERVER=rackspace
|
||||
- go: 1.12.x
|
||||
- go: 1.14.x
|
||||
env: TEST_REAL_SERVER=memset
|
||||
allow_failures:
|
||||
- go: 1.12.x
|
||||
- go: 1.14.x
|
||||
env: TEST_REAL_SERVER=rackspace
|
||||
- go: 1.12.x
|
||||
- go: 1.14.x
|
||||
env: TEST_REAL_SERVER=memset
|
||||
install: go test -i ./...
|
||||
script:
|
||||
|
|
2
vendor/github.com/ncw/swift/README.md
generated
vendored
2
vendor/github.com/ncw/swift/README.md
generated
vendored
|
@ -159,3 +159,5 @@ Contributors
|
|||
- Bo <bo@4xi.com>
|
||||
- Thiago da Silva <thiagodasilva@users.noreply.github.com>
|
||||
- Brandon WELSCH <dev@brandon-welsch.eu>
|
||||
- Damien Tournoud <damien@platform.sh>
|
||||
- Pedro Kiefer <pedro@kiefer.com.br>
|
||||
|
|
2
vendor/github.com/ncw/swift/largeobjects.go
generated
vendored
2
vendor/github.com/ncw/swift/largeobjects.go
generated
vendored
|
@ -222,7 +222,7 @@ func (c *Connection) LargeObjectDelete(container string, objectName string) erro
|
|||
for i, obj := range objects {
|
||||
filenames[i] = obj[0] + "/" + obj[1]
|
||||
}
|
||||
_, err = c.doBulkDelete(filenames)
|
||||
_, err = c.doBulkDelete(filenames, nil)
|
||||
// Don't fail on ObjectNotFound because eventual consistency
|
||||
// makes this situation normal.
|
||||
if err != nil && err != Forbidden && err != ObjectNotFound {
|
||||
|
|
43
vendor/github.com/ncw/swift/swift.go
generated
vendored
43
vendor/github.com/ncw/swift/swift.go
generated
vendored
|
@ -964,7 +964,7 @@ func (c *Connection) ContainersAll(opts *ContainersOpts) ([]Container, error) {
|
|||
return containers, nil
|
||||
}
|
||||
|
||||
// ContainerNamesAll is like ContainerNamess but it returns all the Containers
|
||||
// ContainerNamesAll is like ContainerNames but it returns all the Containers
|
||||
//
|
||||
// It calls ContainerNames multiple times using the Marker parameter
|
||||
//
|
||||
|
@ -1372,6 +1372,13 @@ func (file *ObjectCreateFile) Write(p []byte) (n int, err error) {
|
|||
return
|
||||
}
|
||||
|
||||
// CloseWithError closes the object, aborting the upload.
|
||||
func (file *ObjectCreateFile) CloseWithError(err error) error {
|
||||
_ = file.pipeWriter.CloseWithError(err)
|
||||
<-file.done
|
||||
return nil
|
||||
}
|
||||
|
||||
// Close the object and checks the md5sum if it was required.
|
||||
//
|
||||
// Also returns any other errors from the server (eg container not
|
||||
|
@ -1902,22 +1909,26 @@ type BulkDeleteResult struct {
|
|||
Headers Headers // Response HTTP headers.
|
||||
}
|
||||
|
||||
func (c *Connection) doBulkDelete(objects []string) (result BulkDeleteResult, err error) {
|
||||
func (c *Connection) doBulkDelete(objects []string, h Headers) (result BulkDeleteResult, err error) {
|
||||
var buffer bytes.Buffer
|
||||
for _, s := range objects {
|
||||
u := url.URL{Path: s}
|
||||
buffer.WriteString(u.String() + "\n")
|
||||
}
|
||||
extraHeaders := Headers{
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "text/plain",
|
||||
"Content-Length": strconv.Itoa(buffer.Len()),
|
||||
}
|
||||
for key, value := range h {
|
||||
extraHeaders[key] = value
|
||||
}
|
||||
resp, headers, err := c.storage(RequestOpts{
|
||||
Operation: "DELETE",
|
||||
Parameters: url.Values{"bulk-delete": []string{"1"}},
|
||||
Headers: Headers{
|
||||
"Accept": "application/json",
|
||||
"Content-Type": "text/plain",
|
||||
"Content-Length": strconv.Itoa(buffer.Len()),
|
||||
},
|
||||
ErrorMap: ContainerErrorMap,
|
||||
Body: &buffer,
|
||||
Headers: extraHeaders,
|
||||
ErrorMap: ContainerErrorMap,
|
||||
Body: &buffer,
|
||||
})
|
||||
if err != nil {
|
||||
return
|
||||
|
@ -1957,6 +1968,18 @@ func (c *Connection) doBulkDelete(objects []string) (result BulkDeleteResult, er
|
|||
// * http://docs.openstack.org/trunk/openstack-object-storage/admin/content/object-storage-bulk-delete.html
|
||||
// * http://docs.rackspace.com/files/api/v1/cf-devguide/content/Bulk_Delete-d1e2338.html
|
||||
func (c *Connection) BulkDelete(container string, objectNames []string) (result BulkDeleteResult, err error) {
|
||||
return c.BulkDeleteHeaders(container, objectNames, nil)
|
||||
}
|
||||
|
||||
// BulkDeleteHeaders deletes multiple objectNames from container in one operation.
|
||||
//
|
||||
// Some servers may not accept bulk-delete requests since bulk-delete is
|
||||
// an optional feature of swift - these will return the Forbidden error.
|
||||
//
|
||||
// See also:
|
||||
// * http://docs.openstack.org/trunk/openstack-object-storage/admin/content/object-storage-bulk-delete.html
|
||||
// * http://docs.rackspace.com/files/api/v1/cf-devguide/content/Bulk_Delete-d1e2338.html
|
||||
func (c *Connection) BulkDeleteHeaders(container string, objectNames []string, h Headers) (result BulkDeleteResult, err error) {
|
||||
if len(objectNames) == 0 {
|
||||
result.Errors = make(map[string]error)
|
||||
return
|
||||
|
@ -1965,7 +1988,7 @@ func (c *Connection) BulkDelete(container string, objectNames []string) (result
|
|||
for i, name := range objectNames {
|
||||
fullPaths[i] = fmt.Sprintf("/%s/%s", container, name)
|
||||
}
|
||||
return c.doBulkDelete(fullPaths)
|
||||
return c.doBulkDelete(fullPaths, h)
|
||||
}
|
||||
|
||||
// BulkUploadResult stores results of BulkUpload().
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue