diff --git a/apps.gen.go b/apps.gen.go index 8b01dbb7..7ec24c33 100644 --- a/apps.gen.go +++ b/apps.gen.go @@ -244,6 +244,20 @@ const ( AppDomainSpecType_Alias AppDomainSpecType = "ALIAS" ) +// AppEgressSpec Specification for app egress configurations. +type AppEgressSpec struct { + Type AppEgressSpecType `json:"type,omitempty"` +} + +// AppEgressSpecType the model 'AppEgressSpecType' +type AppEgressSpecType string + +// List of AppEgressSpecType +const ( + APPEGRESSSPECTYPE_Autoassign AppEgressSpecType = "AUTOASSIGN" + APPEGRESSSPECTYPE_DedicatedIp AppEgressSpecType = "DEDICATED_IP" +) + // AppFunctionsSpec struct for AppFunctionsSpec type AppFunctionsSpec struct { // The name. Must be unique across all components within the same app. @@ -495,6 +509,7 @@ type AppSpec struct { // A list of alerts which apply to the app. Alerts []*AppAlertSpec `json:"alerts,omitempty"` Ingress *AppIngressSpec `json:"ingress,omitempty"` + Egress *AppEgressSpec `json:"egress,omitempty"` Features []string `json:"features,omitempty"` } @@ -1012,8 +1027,10 @@ type ImageSourceSpec struct { // The repository tag. Defaults to `latest` if not provided and no digest is provided. Cannot be specified if digest is provided. Tag string `json:"tag,omitempty"` // The image digest. Cannot be specified if tag is provided. - Digest string `json:"digest,omitempty"` - DeployOnPush *ImageSourceSpecDeployOnPush `json:"deploy_on_push,omitempty"` + Digest string `json:"digest,omitempty"` + // The credentials to be able to pull the image. The value will be encrypted on first submission. On following submissions, the encrypted value should be used. - \"$username:$access_token\" for registries of type `DOCKER_HUB`. - \"$username:$access_token\" for registries of type `GHCR`. + RegistryCredentials string `json:"registry_credentials,omitempty"` + DeployOnPush *ImageSourceSpecDeployOnPush `json:"deploy_on_push,omitempty"` } // ImageSourceSpecDeployOnPush struct for ImageSourceSpecDeployOnPush @@ -1022,7 +1039,7 @@ type ImageSourceSpecDeployOnPush struct { Enabled bool `json:"enabled,omitempty"` } -// ImageSourceSpecRegistryType - DOCR: The DigitalOcean container registry type. - DOCKER_HUB: The DockerHub container registry type. +// ImageSourceSpecRegistryType - DOCR: The DigitalOcean container registry type. - DOCKER_HUB: The DockerHub container registry type. - GHCR: The GitHub container registry type. type ImageSourceSpecRegistryType string // List of ImageSourceSpecRegistryType @@ -1030,6 +1047,7 @@ const ( ImageSourceSpecRegistryType_Unspecified ImageSourceSpecRegistryType = "UNSPECIFIED" ImageSourceSpecRegistryType_DOCR ImageSourceSpecRegistryType = "DOCR" ImageSourceSpecRegistryType_DockerHub ImageSourceSpecRegistryType = "DOCKER_HUB" + ImageSourceSpecRegistryType_Ghcr ImageSourceSpecRegistryType = "GHCR" ) // AppInstanceSize struct for AppInstanceSize diff --git a/apps_accessors.go b/apps_accessors.go index 486c7597..059d6473 100644 --- a/apps_accessors.go +++ b/apps_accessors.go @@ -757,6 +757,14 @@ func (a *AppDomainValidation) GetTXTValue() string { return a.TXTValue } +// GetType returns the Type field. +func (a *AppEgressSpec) GetType() AppEgressSpecType { + if a == nil { + return "" + } + return a.Type +} + // GetAlerts returns the Alerts field. func (a *AppFunctionsSpec) GetAlerts() []*AppAlertSpec { if a == nil { @@ -1733,6 +1741,14 @@ func (a *AppSpec) GetDomains() []*AppDomainSpec { return a.Domains } +// GetEgress returns the Egress field. +func (a *AppSpec) GetEgress() *AppEgressSpec { + if a == nil { + return nil + } + return a.Egress +} + // GetEnvs returns the Envs field. func (a *AppSpec) GetEnvs() []*AppVariableDefinition { if a == nil { @@ -3189,6 +3205,14 @@ func (i *ImageSourceSpec) GetRegistry() string { return i.Registry } +// GetRegistryCredentials returns the RegistryCredentials field. +func (i *ImageSourceSpec) GetRegistryCredentials() string { + if i == nil { + return "" + } + return i.RegistryCredentials +} + // GetRegistryType returns the RegistryType field. func (i *ImageSourceSpec) GetRegistryType() ImageSourceSpecRegistryType { if i == nil { diff --git a/apps_accessors_test.go b/apps_accessors_test.go index 5cfdb486..f23aee28 100644 --- a/apps_accessors_test.go +++ b/apps_accessors_test.go @@ -664,6 +664,13 @@ func TestAppDomainValidation_GetTXTValue(tt *testing.T) { a.GetTXTValue() } +func TestAppEgressSpec_GetType(tt *testing.T) { + a := &AppEgressSpec{} + a.GetType() + a = nil + a.GetType() +} + func TestAppFunctionsSpec_GetAlerts(tt *testing.T) { a := &AppFunctionsSpec{} a.GetAlerts() @@ -1518,6 +1525,13 @@ func TestAppSpec_GetDomains(tt *testing.T) { a.GetDomains() } +func TestAppSpec_GetEgress(tt *testing.T) { + a := &AppSpec{} + a.GetEgress() + a = nil + a.GetEgress() +} + func TestAppSpec_GetEnvs(tt *testing.T) { a := &AppSpec{} a.GetEnvs() @@ -2792,6 +2806,13 @@ func TestImageSourceSpec_GetRegistry(tt *testing.T) { i.GetRegistry() } +func TestImageSourceSpec_GetRegistryCredentials(tt *testing.T) { + i := &ImageSourceSpec{} + i.GetRegistryCredentials() + i = nil + i.GetRegistryCredentials() +} + func TestImageSourceSpec_GetRegistryType(tt *testing.T) { i := &ImageSourceSpec{} i.GetRegistryType()