code: func newGetLabelsHandler(s plat.LabelService) http.HandlerFunc {
  	return func(w http.ResponseWriter, r *http.Request) {
  		ctx := r.Context()
  
  		req, err := decodeGetLabelsRequest(ctx, r)
  		if err != nil {
  			EncodeError(ctx, err, w)
  			return
  		}
  
  		opts := plat.FindOptions{}
  		labels, err := s.FindLabels(ctx, req.filter)
  		if err != nil {
  			EncodeError(ctx, err, w)
  			return
  		}
  
  		if err := encodeResponse(ctx, w, http.StatusOK, newLabelsResponse(opts, req.filter, labels)); err != nil {
  			// TODO: this can potentially result in calling w.WriteHeader multiple times, we need to pass a logger in here
  			// some how. This isn't as simple as simply passing in a logger to this function since the time that this function
  			// is called is distinct from the time that a potential logger is set.
  			EncodeError(ctx, err, w)
  			return
  		}
  	}
  }
docs: // newGetLabelsHandler returns a handler func for a GET to /labels endpoints