Migrate to PresignedGetObject from PresignedGetPartialObject() as the latter was of no real use

This commit is contained in:
Harshavardhana
2015-08-21 20:39:22 -07:00
parent 0785fff42b
commit c992bb682f
6 changed files with 15 additions and 24 deletions
+1 -1
View File
@@ -35,7 +35,7 @@ type Client interface {
SetBucketACL(acl string) *probe.Error
// Object operations
Share(expires time.Duration, offset, length int64) (string, *probe.Error)
Share(expires time.Duration) (string, *probe.Error)
GetObject(offset, length int64) (body io.ReadCloser, size int64, err *probe.Error)
PutObject(size int64, data io.Reader) *probe.Error
+1 -1
View File
@@ -122,7 +122,7 @@ func (f *fsClient) get() (io.ReadCloser, int64, *probe.Error) {
}
}
func (f *fsClient) Share(expires time.Duration, offset, length int64) (string, *probe.Error) {
func (f *fsClient) Share(expires time.Duration) (string, *probe.Error) {
return "", probe.NewError(client.APINotImplemented{API: "Share", APIType: "filesystem"})
}
+2 -2
View File
@@ -102,9 +102,9 @@ func (c *s3Client) GetObject(offset, length int64) (io.ReadCloser, int64, *probe
}
// Share - get a usable get object url to share
func (c *s3Client) Share(expires time.Duration, offset, length int64) (string, *probe.Error) {
func (c *s3Client) Share(expires time.Duration) (string, *probe.Error) {
bucket, object := c.url2BucketAndObject()
presignedURL, err := c.api.PresignedGetPartialObject(bucket, object, expires, offset, length)
presignedURL, err := c.api.PresignedGetObject(bucket, object, expires)
if err != nil {
return "", probe.NewError(err)
}