Skip to content

Commit 24d081e

Browse files
authored
Implement missing storage-cli operations for AliCloud (cloudfoundry#10)
* Implement missing storage-cli operations for AliCloud Missing Operations: copy, delete-recursive, list, properties, ensure-bucket-exists.
1 parent 5e04e00 commit 24d081e

File tree

4 files changed

+890
-20
lines changed

4 files changed

+890
-20
lines changed

alioss/client/client.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package client
33
import (
44
"crypto/md5"
55
"encoding/base64"
6-
"errors"
76
"fmt"
87
"io"
98
"log"
@@ -80,21 +79,21 @@ func (client *AliBlobstore) getMD5(filePath string) (string, error) {
8079
}
8180

8281
func (client *AliBlobstore) List(prefix string) ([]string, error) {
83-
return nil, errors.New("not implemented")
82+
return client.storageClient.List(prefix)
8483
}
8584

8685
func (client *AliBlobstore) Copy(srcBlob string, dstBlob string) error {
87-
return errors.New("not implemented")
86+
return client.storageClient.Copy(srcBlob, dstBlob)
8887
}
8988

9089
func (client *AliBlobstore) Properties(dest string) error {
91-
return errors.New("not implemented")
90+
return client.storageClient.Properties(dest)
9291
}
9392

9493
func (client *AliBlobstore) EnsureStorageExists() error {
95-
return errors.New("not implemented")
94+
return client.storageClient.EnsureBucketExists()
9695
}
9796

9897
func (client *AliBlobstore) DeleteRecursive(prefix string) error {
99-
return errors.New("not implemented")
98+
return client.storageClient.DeleteRecursive(prefix)
10099
}

0 commit comments

Comments
 (0)