Просмотр исходного кода

fix: add missing docblock comments

Jose Diaz-Gonzalez 2 лет назад
Родитель
Сommit
1bd92a006f
1 измененных файлов с 9 добавлено и 6 удалено
  1. 9 6
      api/server/handlers/registry/status.go

+ 9 - 6
api/server/handlers/registry/status.go

@@ -16,11 +16,20 @@ import (
 	"github.com/porter-dev/porter/internal/telemetry"
 )
 
+// StatusHandler is a struct for handling registry status requests
 type StatusHandler struct {
 	handlers.PorterHandlerReadWriter
 	authz.KubernetesAgentGetter
 }
 
+// StatusResponse describes an outbound registry status response
+type StatusResponse struct {
+	ProjectID  int  `json:"project_id"`
+	RegistryID int  `json:"registry_id"`
+	Status     bool `json:"status"`
+}
+
+// NewStatusHandler constructs a registry StatusHandler
 func NewStatusHandler(
 	config *config.Config,
 	decoderValidator shared.RequestDecoderValidator,
@@ -32,12 +41,6 @@ func NewStatusHandler(
 	}
 }
 
-type StatusResponse struct {
-	ProjectID  int  `json:"project_id"`
-	RegistryID int  `json:"registry_id"`
-	Status     bool `json:"status"`
-}
-
 func (c *StatusHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	ctx, span := telemetry.NewSpan(r.Context(), "serve-cluster-status")
 	defer span.End()