fix(apply): first hexagonal refactoring mismatched AppTypes

This commit is contained in:
Stephan Lo 2025-10-09 13:58:45 +02:00
parent 054b1c91fc
commit 00487bec7c

View file

@ -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
}
}