From 00487bec7cf5947e1652f30e80570bcf9e149d31 Mon Sep 17 00:00:00 2001 From: Stephan Lo Date: Thu, 9 Oct 2025 13:58:45 +0200 Subject: [PATCH] fix(apply): first hexagonal refactoring mismatched AppTypes --- internal/application/apply/types.go | 50 ++++++++++++++--------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/internal/application/apply/types.go b/internal/application/apply/types.go index e1ad861..451043c 100644 --- a/internal/application/apply/types.go +++ b/internal/application/apply/types.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "edp.buildth.ing/DevFW-CICD/edge-connect-client/internal/infrastructure/config" "edp.buildth.ing/DevFW-CICD/edge-connect-client/internal/domain" + "edp.buildth.ing/DevFW-CICD/edge-connect-client/internal/infrastructure/config" ) // ActionType defines the type of action to be performed @@ -25,21 +25,21 @@ const ( type AppType string const ( - AppTypeK8s AppType = "KUBERNETES" - AppTypeDocker AppType = "DOCKER" + AppTypeK8s AppType = "k8s" + AppTypeDocker AppType = "docker" ) // AppState represents the desired or current state of an application type AppState struct { - Name string - Version string - Organization string - Region string - AppType AppType - ManifestHash string - OutboundConnections []domain.SecurityRule - Exists bool - LastUpdated time.Time + Name string + Version string + Organization string + Region string + AppType AppType + ManifestHash string + OutboundConnections []domain.SecurityRule + Exists bool + LastUpdated time.Time } // InstanceState represents the desired or current state of an application instance @@ -82,14 +82,14 @@ type InstanceAction struct { // DeploymentPlan represents a plan of actions to achieve the desired state type DeploymentPlan struct { - ConfigName string - CreatedAt time.Time - DryRun bool - AppAction AppAction - InstanceActions []InstanceAction - TotalActions int + ConfigName string + CreatedAt time.Time + DryRun bool + AppAction AppAction + InstanceActions []InstanceAction + TotalActions int EstimatedDuration time.Duration - Summary string + Summary string } // IsEmpty returns true if the plan contains no actions @@ -152,10 +152,10 @@ type ExecutionResult struct { // ActionResult details the outcome of a single action type ActionResult struct { - Type ActionType - Target string - Success bool - Error error - Details string + Type ActionType + Target string + Success bool + Error error + Details string Duration time.Duration -} \ No newline at end of file +}