code: func (c *Client) FindBucket(ctx context.Context, filter platform.BucketFilter) (*platform.Bucket, error) {
  	var b *platform.Bucket
  	var err error
  
  	if filter.ID != nil {
  		b, err = c.FindBucketByID(ctx, *filter.ID)
  		if err != nil {
  			return nil, &platform.Error{
  				Op:  getOp(platform.OpFindBucket),
  				Err: err,
  			}
  		}
  		return b, nil
  	}
  
  	if filter.Name != nil && filter.OrganizationID != nil {
  		return c.FindBucketByName(ctx, *filter.OrganizationID, *filter.Name)
  	}
  
  	err = c.db.View(func(tx *bolt.Tx) error {
  		if filter.Organization != nil {
  			o, err := c.findOrganizationByName(ctx, tx, *filter.Organization)
  			if err != nil {
  				return err
  			}
  			filter.OrganizationID = &o.ID
  		}
  
  		filterFn := filterBucketsFn(filter)
  		return c.forEachBucket(ctx, tx, func(bkt *platform.Bucket) bool {
  			if filterFn(bkt) {
  				b = bkt
  				return false
  			}
  			return true
  		})
  	})
  
  	if err != nil {
  		return nil, &platform.Error{
  			Op:  getOp(platform.OpFindBucket),
  			Err: err,
  		}
  	}
  
  	if b == nil {
  		return nil, &platform.Error{
  			Code: platform.ENotFound,
  			Msg:  "bucket not found",
  		}
  	}
  
  	return b, nil
  }
docs: // FindBucket retrives a bucket using an arbitrary bucket filter.
  // Filters using ID, or OrganizationID and bucket Name should be efficient.
  // Other filters will do a linear scan across buckets until it finds a match.