validation

package
v0.19.1111 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const MinTerraformVersion = "1.8.0"

Variables

This section is empty.

Functions

func ToAppHealthProbes

func ToAppHealthProbes(health *config.ComponentHealthConfig) app.ComponentHealthProbes

ToAppHealthProbes converts declared probes into the JSONB payload persisted on the component config connection.

func ToAppHealthProbesFromList

func ToAppHealthProbesFromList(probes []config.ComponentHealthProbeConfig) app.ComponentHealthProbes

ToAppHealthProbesFromList converts an already-flattened probe list into the JSONB payload persisted on the component config connection.

func ToAppRequiredChecks

func ToAppRequiredChecks(names []string) app.ComponentHealthRequiredChecks

func ValidateBuildTimeout

func ValidateBuildTimeout(timeout string) error

ValidateBuildTimeout validates a build timeout duration string. Returns an error if the format is invalid or the value is out of range.

func ValidateCronSchedule

func ValidateCronSchedule(cronExpr string) error

ValidateCronSchedule validates a cron expression string. Returns an error if the cron expression is invalid or fires more frequently than validatorPkg.MinCronInterval. Duplicates logic from services/ctl-api/internal/pkg/validator/cron_schedule.go

func ValidateDNSName

func ValidateDNSName(name string, minLen, maxLen int) error

ValidateDNSName validates a DNS RFC 1035 label (used for Helm chart names, K8s resources, etc). Must be 1-63 characters, start with a letter, and contain only lowercase letters, numbers, and hyphens.

func ValidateDNSSubdomain

func ValidateDNSSubdomain(name string) error

ValidateDNSSubdomain validates a DNS RFC 1123 subdomain, the form Kubernetes object names take.

func ValidateDeployTimeout

func ValidateDeployTimeout(timeout string) error

ValidateDeployTimeout validates a deploy timeout duration string. Returns an error if the format is invalid or the value is out of range.

func ValidateEntityName

func ValidateEntityName(name string) error

ValidateEntityName validates a standard entity name. Allows: lowercase letters, numbers, underscores, and hyphens Duplicates logic from services/ctl-api/internal/pkg/validator/entity_name.go

func ValidateHealthProbeList

func ValidateHealthProbeList(probes []config.ComponentHealthProbeConfig) error

ValidateHealthProbeList validates an already-flattened probe list.

func ValidateHealthProbes

func ValidateHealthProbes(health *config.ComponentHealthConfig) error

ValidateHealthProbes validates the probes declared on a component health block, using the same rules the CLI applies before sync.

func ValidateHealthStabilizationWindow

func ValidateHealthStabilizationWindow(window string) error

ValidateHealthStabilizationWindow validates a health stabilization window duration string. Returns an error if the format is invalid or the value is out of range.

func ValidateInterpolatedName

func ValidateInterpolatedName(name string) error

ValidateInterpolatedName validates a name that allows interpolation syntax. Allows: lowercase letters, numbers, underscores, dots, and curly braces Duplicates logic from services/ctl-api/internal/pkg/validator/interpolated_name.go

func ValidateMaxAutoRetries

func ValidateMaxAutoRetries(maxAutoRetries int) error

ValidateMaxAutoRetries validates a max auto retries value.

func ValidateRequiredChecks

func ValidateRequiredChecks(names []string) error

ValidateRequiredChecks rejects names the push endpoint would refuse, so a deploy cannot be gated on a check that can never be reported.

func ValidateTerraformMinVersion

func ValidateTerraformMinVersion(version string) error

ValidateTerraformMinVersion validates a Terraform version string against only the minimum constraint. Used by the DB syncer which does not have access to tfClient.GetLatestVersion() for the upper bound.

func ValidateTerraformVersion

func ValidateTerraformVersion(version string, minVersion string, maxVersion string) error

ValidateTerraformVersion validates a Terraform version string against min/max constraints.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL