validation

package
v0.0.5-alpha Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAnnotationKey

func ValidateAnnotationKey(key string) bool

func ValidateLabelKey

func ValidateLabelKey(key string) bool

K8s string validations

func ValidateName

func ValidateName(name string) bool

func ValidateNamespace

func ValidateNamespace(namespace string) bool

func ValidateStackConnection

func ValidateStackConnection(in *openapi.StackConnection) *errors.ServiceError

ValidateStackConnection validates the structurally-required fields of a stack connection on the thin create/update paths. It mirrors the fields the model-level validator relies on (kind, from.type, to.type) without re-checking the type-specific or graph-relative constraints, which need the surrounding stack to resolve. Id is never required here: it is generated on create and supplied via the URL path on update.

func ValidateStackResource

func ValidateStackResource(in *openapi.StackResource, stack *openapi.Stack) *errors.ServiceError

ValidateStackResource validates a single stack resource. When stack is nil, the depends_on check is skipped since peer resources cannot be resolved without the surrounding stack.

Types

type Validate

type Validate func() *errors.ServiceError

func ValidateAPITokenCreate

func ValidateAPITokenCreate(in *openapi.APITokenCreateRequest) Validate

func ValidateAll

func ValidateAll(rules []Validate) Validate

func ValidateStack

func ValidateStack(in *openapi.Stack) Validate

func ValidateStackShell

func ValidateStackShell(in *openapi.Stack) Validate

ValidateStackShell validates only the stack's own (shell) fields, without validating any child stack resources. Use this on thin create/update paths where child resources are managed separately.

func ValidateUserCreate

func ValidateUserCreate(in *openapi.UserSignupRequest) Validate

func ValidateUserLogin

func ValidateUserLogin(in *openapi.LoginRequest) Validate

func ValidateVolume

func ValidateVolume(in *openapi.Volume) Validate

func ValidateVolumeWithOptionalSize

func ValidateVolumeWithOptionalSize(in *openapi.Volume) Validate

Jump to

Keyboard shortcuts

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