code: func (h *SourceHandler) handleGetSourcesBuckets(w http.ResponseWriter, r *http.Request) {
  	ctx := r.Context()
  
  	req, err := decodeGetSourceBucketsRequest(ctx, r)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  
  	s, err := h.SourceService.FindSourceByID(ctx, req.SourceID)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  
  	bucketSvc, err := h.NewBucketService(s)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  	bs, _, err := bucketSvc.FindBuckets(ctx, req.filter)
  	if err != nil {
  		EncodeError(ctx, err, w)
  		return
  	}
  
  	if err := encodeResponse(ctx, w, http.StatusOK, bs); err != nil {
  		logEncodingError(h.Logger, r, err)
  		return
  	}
  }
docs: // handleGetSourcesBuckets is the HTTP handler for the GET /api/v2/sources/:id/buckets route.