Skip to content

Commit

Permalink
feat(storage): add BucketName to BucketHandle
Browse files Browse the repository at this point in the history
The bucket name is currently only accessible via the Attrs() network call, and can be trivially returned from the bucket handle.

I used BucketName instead of just Name, as ObjectHandle has both BucketName and ObjectName.
  • Loading branch information
derekperkins committed May 13, 2024
1 parent 37220bd commit fbb4a47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions storage/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ func (b *BucketHandle) DefaultObjectACL() *ACLHandle {
return &b.defaultObjectACL
}

// BucketName returns the name of the bucket.
func (b *BucketHandle) BucketName() string {
return b.name
}

// Object returns an ObjectHandle, which provides operations on the named object.
// This call does not perform any network operations such as fetching the object or verifying its existence.
// Use methods on ObjectHandle to perform network operations.
Expand Down

0 comments on commit fbb4a47

Please sign in to comment.