validation

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package validation provides shared validation primitives used by both the API layer (pkg/secrets) and the in-pod materializer (pkg/agentd/secrets). Keeping validation here prevents drift between the two code paths.

Index

Constants

View Source
const SecretNamePattern = `^[a-z0-9._-]+$`

SecretNamePattern is the regex pattern (as a string) that secret names must match. Frontend teams SHOULD copy this exact string into their client-side validation (e.g., React Hook Form pattern or zod .regex()). This package is the single source of truth — file an issue against pkg/validation if the pattern needs to change.

Variables

SecretNameRE is the compiled regex for SecretNamePattern. Exported so callers can use it directly in Go.

Functions

func ValidateSecretName

func ValidateSecretName(s string) error

ValidateSecretName validates a secret name against the shared rules. Returns nil if valid, or a descriptive error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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