func (sbc *GCSBucketClient) Bucket(name string) BucketHandler {
	return sbc.c.Bucket(name)
}
Bucket produces a BucketHandler for the named bucket.
package storage
import (
	"context"
	"time"
	"cloud.google.com/go/storage"
	"github.com/google/go-cmp/cmp"
	"github.com/imdario/mergo"
	"k8s.io/client-go/util/workqueue"
	ctrl "sigs.k8s.io/controller-runtime"
	"sigs.k8s.io/controller-runtime/pkg/client"
	"sigs.k8s.io/controller-runtime/pkg/controller"
	xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
	"github.com/crossplane/crossplane-runtime/pkg/errors"
	"github.com/crossplane/crossplane-runtime/pkg/event"
	"github.com/crossplane/crossplane-runtime/pkg/logging"
	"github.com/crossplane/crossplane-runtime/pkg/meta"
	"github.com/crossplane/crossplane-runtime/pkg/ratelimiter"
	"github.com/crossplane/crossplane-runtime/pkg/reconciler/managed"
	"github.com/crossplane/crossplane-runtime/pkg/resource"
	"github.com/crossplane/provider-gcp/apis/storage/v1alpha3"
	gcp "github.com/crossplane/provider-gcp/pkg/clients"
)
const (
	errNewClient = "cannot create new GCP storage client"
	errNotBucket = "managed resource is not a GCP bucket"
	errAttrs     = "cannot get GCP bucket attributes"
	errLateInit  = "cannot late initialize GCP bucket"
	errCreate    = "cannot create GCP bucket"
	errUpdate    = "cannot update GCP bucket"
	errDelete    = "cannot delete GCP bucket"
)
func SetupBucket(mgr ctrl.Manager, l logging.Logger, rl workqueue.RateLimiter, poll time.Duration) error {
	name := managed.ControllerName(v1alpha3.BucketGroupKind)
	return ctrl.NewControllerManagedBy(mgr).
		Named(name).
		WithOptions(controller.Options{
			RateLimiter: ratelimiter.NewDefaultManagedRateLimiter(rl),
		}).
		For(&v1alpha3.Bucket{}).
		Complete(managed.NewReconciler(mgr,
			resource.ManagedKind(v1alpha3.BucketGroupVersionKind),
			managed.WithExternalConnecter(&connecter{client: mgr.GetClient()}),
			managed.WithPollInterval(poll),
			managed.WithLogger(l.WithValues("controller", name)),
			managed.WithRecorder(event.NewAPIRecorder(mgr.GetEventRecorderFor(name)))))
}
type BucketClient interface {
	Bucket(name string) BucketHandler
}
type GCSBucketClient struct {
	c *storage.Client
}