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
@@ -72,7 +72,6 @@ type ObjectAPI interface {
// PresignedAPI - object specific for now
type PresignedAPI interface {
PresignedGetObject(bucket, object string, expires time.Duration) (string, error)
PresignedGetPartialObject(bucket, object string, expires time.Duration, offset, length int64) (string, error)
}
// BucketStatCh - bucket metadata over read channel
@@ -235,14 +234,6 @@ func (a apiV2) PresignedGetObject(bucket, object string, expires time.Duration)
return a.presignedGetObject(bucket, object, expireSeconds, 0, 0)
}
func (a apiV2) PresignedGetPartialObject(bucket, object string, expires time.Duration, offset, length int64) (string, error) {
expireSeconds := int64(expires / time.Second)
if expireSeconds < 1 || expireSeconds > 604800 {
return "", invalidArgumentError("")
}
return a.presignedGetObject(bucket, object, expireSeconds, offset, length)
}
// GetObject retrieve object
// Downloads full object with no ranges, if you need ranges use GetPartialObject