2
0

list_registry_ints.go 731 B

123456789101112131415161718192021222324252627
  1. package metadata
  2. import (
  3. "net/http"
  4. "github.com/porter-dev/porter/api/server/handlers"
  5. "github.com/porter-dev/porter/api/server/shared"
  6. "github.com/porter-dev/porter/api/server/shared/config"
  7. "github.com/porter-dev/porter/api/types"
  8. )
  9. type ListRegistryIntegrationsHandler struct {
  10. handlers.PorterHandlerWriter
  11. }
  12. func NewListRegistryIntegrationsHandler(
  13. config *config.Config,
  14. writer shared.ResultWriter,
  15. ) *ListRegistryIntegrationsHandler {
  16. return &ListRegistryIntegrationsHandler{
  17. PorterHandlerWriter: handlers.NewDefaultPorterHandler(config, nil, writer),
  18. }
  19. }
  20. func (v *ListRegistryIntegrationsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
  21. v.WriteResult(w, r, types.PorterRegistryIntegrations)
  22. }