@@ -27,7 +27,7 @@ import (
2727)
2828
2929type Capabilities struct {
30- MaxMultipartSize uint64
30+ MaxMultipartSize uint64
3131 // indicates that the blob store has native support for directories
3232 DirBlob bool
3333 Name string
@@ -44,7 +44,7 @@ type BlobItemOutput struct {
4444 Size uint64
4545 StorageClass * string
4646 // may be nil in list responses for backends that don't return metadata in listings
47- Metadata map [string ]* string
47+ Metadata map [string ]* string
4848}
4949
5050type HeadBlobOutput struct {
@@ -179,7 +179,7 @@ type MultipartBlobAddInput struct {
179179
180180type MultipartBlobAddOutput struct {
181181 RequestId string
182- PartId * string
182+ PartId * string
183183}
184184
185185type MultipartBlobCopyInput struct {
@@ -192,7 +192,7 @@ type MultipartBlobCopyInput struct {
192192
193193type MultipartBlobCopyOutput struct {
194194 RequestId string
195- PartId * string
195+ PartId * string
196196}
197197
198198type MultipartBlobCommitOutput struct {
@@ -228,6 +228,14 @@ type MakeBucketOutput struct {
228228 RequestId string
229229}
230230
231+ type GetBucketUsageInput struct {
232+ }
233+
234+ type GetBucketUsageOutput struct {
235+ Size uint64
236+ RequestId string
237+ }
238+
231239/// Implementations of all the functions here are expected to be
232240/// concurrency-safe, except for
233241///
@@ -256,6 +264,7 @@ type StorageBackend interface {
256264 MultipartExpire (param * MultipartExpireInput ) (* MultipartExpireOutput , error )
257265 RemoveBucket (param * RemoveBucketInput ) (* RemoveBucketOutput , error )
258266 MakeBucket (param * MakeBucketInput ) (* MakeBucketOutput , error )
267+ GetBucketUsage (param * GetBucketUsageInput ) (* GetBucketUsageOutput , error )
259268 Delegate () interface {}
260269}
261270
@@ -424,6 +433,11 @@ func (s *StorageBackendInitWrapper) MakeBucket(param *MakeBucketInput) (*MakeBuc
424433 return s .StorageBackend .MakeBucket (param )
425434}
426435
436+ func (s * StorageBackendInitWrapper ) GetBucketUsage (param * GetBucketUsageInput ) (* GetBucketUsageOutput , error ) {
437+ s .Init ("" )
438+ return s .StorageBackend .GetBucketUsage (param )
439+ }
440+
427441type StorageBackendInitError struct {
428442 error
429443 cap Capabilities
@@ -547,3 +561,7 @@ func (e StorageBackendInitError) RemoveBucket(param *RemoveBucketInput) (*Remove
547561func (e StorageBackendInitError ) MakeBucket (param * MakeBucketInput ) (* MakeBucketOutput , error ) {
548562 return nil , e
549563}
564+
565+ func (e StorageBackendInitError ) GetBucketUsage (param * GetBucketUsageInput ) (* GetBucketUsageOutput , error ) {
566+ return nil , e
567+ }
0 commit comments