code: func (h *BucketHandler) handleGetBuckets(w http.ResponseWriter, r *http.Request) {
  	ctx := r.Context()
  
  	req, err := decodeGetBucketsRequest(ctx, r)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  
  	bs, _, err := h.BucketService.FindBuckets(ctx, req.filter, req.opts)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  
  	if err := encodeResponse(ctx, w, http.StatusOK, newBucketsResponse(ctx, req.opts, req.filter, bs, h.LabelService)); err != nil {
  		logEncodingError(h.Logger, r, err)
  		return
  	}
  }
docs: // handleGetBuckets is the HTTP handler for the GET /api/v2/buckets route.