validator

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxNamespaceLength is the maximum allowed length for a namespace
	MaxNamespaceLength = 63

	// NamespacePattern defines the valid pattern for namespace names
	// Must start and end with alphanumeric, can contain hyphens in the middle
	NamespacePattern = `^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`
)

Variables

View Source
var (

	// ReservedNamespaces contains namespace names that cannot be used
	// Currently empty but structured to allow future additions
	ReservedNamespaces = map[string]bool{}
)

Functions

This section is empty.

Types

type NamespaceValidator

type NamespaceValidator struct{}

NamespaceValidator validates namespace values

func NewNamespaceValidator

func NewNamespaceValidator() *NamespaceValidator

NewNamespaceValidator creates a new namespace validator

func (*NamespaceValidator) ValidateNamespace

func (v *NamespaceValidator) ValidateNamespace(namespace string) error

ValidateNamespace validates a single namespace value

func (*NamespaceValidator) ValidateNamespaces

func (v *NamespaceValidator) ValidateNamespaces(namespaces []string) error

ValidateNamespaces validates a collection of namespaces

Jump to

Keyboard shortcuts

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