Skip to content

Commit 203cc59

Browse files
authored
feat(storage): add BucketName to BucketHandle (#10127)
The bucket name is currently only accessible via the Attrs() network call, and can be trivially returned from the bucket handle. Today we have to pass around a `BucketHandle` and the bucket name separately. I used BucketName instead of just Name, as ObjectHandle has both BucketName and ObjectName.
1 parent 4bb12e6 commit 203cc59

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎storage/bucket.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@ func (b *BucketHandle) DefaultObjectACL() *ACLHandle {
116116
return &b.defaultObjectACL
117117
}
118118

119+
// BucketName returns the name of the bucket.
120+
func (b *BucketHandle) BucketName() string {
121+
return b.name
122+
}
123+
119124
// Object returns an ObjectHandle, which provides operations on the named object.
120125
// This call does not perform any network operations such as fetching the object or verifying its existence.
121126
// Use methods on ObjectHandle to perform network operations.

0 commit comments

Comments
 (0)