Micro-service for file storage and processing written in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
445 B

  1. package controllers
  2. import (
  3. "encoding/json"
  4. "github.com/geplauder/lithium/pipelines"
  5. "github.com/geplauder/lithium/storage"
  6. "net/http"
  7. )
  8. func PipelineHandler(pipeline pipelines.IPipeline, storageProvider storage.IStorageProvider, w http.ResponseWriter, r *http.Request) {
  9. w.Header().Set("Content-Type", "application/json")
  10. err := json.NewEncoder(w).Encode(pipeline)
  11. if err != nil {
  12. w.WriteHeader(http.StatusInternalServerError)
  13. }
  14. }