diff --git a/bin/edge-connect-cli b/bin/edge-connect-cli index 84230e1..2e70bb6 100755 Binary files a/bin/edge-connect-cli and b/bin/edge-connect-cli differ diff --git a/internal/core/domain/app.go b/internal/core/domain/app.go new file mode 100644 index 0000000..026c122 --- /dev/null +++ b/internal/core/domain/app.go @@ -0,0 +1,31 @@ +package domain + +// AppKey uniquely identifies an application +type AppKey struct { + Organization string + Name string + Version string +} + +// App represents an application definition +type App struct { + Key AppKey + Deployment string + ImageType string + ImagePath string + AllowServerless bool + DefaultFlavor Flavor + ServerlessConfig interface{} + DeploymentGenerator string + DeploymentManifest string + RequiredOutboundConnections []SecurityRule + Fields []string +} + +// SecurityRule defines network access rules +type SecurityRule struct { + PortRangeMax int + PortRangeMin int + Protocol string + RemoteCIDR string +} diff --git a/internal/core/domain/app_instance.go b/internal/core/domain/app_instance.go new file mode 100644 index 0000000..6d2e9bd --- /dev/null +++ b/internal/core/domain/app_instance.go @@ -0,0 +1,18 @@ +package domain + +// AppInstanceKey uniquely identifies an application instance +type AppInstanceKey struct { + Organization string + Name string + CloudletKey CloudletKey +} + +// AppInstance represents a deployed application instance +type AppInstance struct { + Key AppInstanceKey + AppKey AppKey + Flavor Flavor + State string + PowerState string + Fields []string +} diff --git a/internal/core/domain/cloudlet.go b/internal/core/domain/cloudlet.go new file mode 100644 index 0000000..51bc66e --- /dev/null +++ b/internal/core/domain/cloudlet.go @@ -0,0 +1,26 @@ +package domain + +// CloudletKey uniquely identifies a cloudlet +type CloudletKey struct { + Organization string + Name string +} + +// Cloudlet represents edge infrastructure +type Cloudlet struct { + Key CloudletKey + Location Location + IpSupport string + NumDynamicIps int32 + State string + Flavor Flavor + PhysicalName string + Region string + NotifySrvAddr string +} + +// Location represents geographical coordinates +type Location struct { + Latitude float64 + Longitude float64 +} diff --git a/internal/core/domain/domain.go b/internal/core/domain/domain.go deleted file mode 100644 index 3613c4b..0000000 --- a/internal/core/domain/domain.go +++ /dev/null @@ -1,79 +0,0 @@ - -package domain - -// AppKey uniquely identifies an application -type AppKey struct { - Organization string - Name string - Version string -} - -// CloudletKey uniquely identifies a cloudlet -type CloudletKey struct { - Organization string - Name string -} - -// AppInstanceKey uniquely identifies an application instance -type AppInstanceKey struct { - Organization string - Name string - CloudletKey CloudletKey -} - -// Flavor defines resource allocation for instances -type Flavor struct { - Name string -} - -// SecurityRule defines network access rules -type SecurityRule struct { - PortRangeMax int - PortRangeMin int - Protocol string - RemoteCIDR string -} - -// App represents an application definition -type App struct { - Key AppKey - Deployment string - ImageType string - ImagePath string - AllowServerless bool - DefaultFlavor Flavor - ServerlessConfig interface{} - DeploymentGenerator string - DeploymentManifest string - RequiredOutboundConnections []SecurityRule - Fields []string -} - -// AppInstance represents a deployed application instance -type AppInstance struct { - Key AppInstanceKey - AppKey AppKey - Flavor Flavor - State string - PowerState string - Fields []string -} - -// Cloudlet represents edge infrastructure -type Cloudlet struct { - Key CloudletKey - Location Location - IpSupport string - NumDynamicIps int32 - State string - Flavor Flavor - PhysicalName string - Region string - NotifySrvAddr string -} - -// Location represents geographical coordinates -type Location struct { - Latitude float64 - Longitude float64 -} diff --git a/internal/core/domain/flavor.go b/internal/core/domain/flavor.go new file mode 100644 index 0000000..e11b3ed --- /dev/null +++ b/internal/core/domain/flavor.go @@ -0,0 +1,6 @@ +package domain + +// Flavor defines resource allocation for instances +type Flavor struct { + Name string +}