validation

package
v0.67.1 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TenantValidator

type TenantValidator struct {
	// List of forbidden tenant ID values that pass the CRD pattern but are not allowed by Mimir
	ForbiddenValues []string
}

TenantValidator provides common validation logic for tenant IDs across API versions.

func NewTenantValidator

func NewTenantValidator() *TenantValidator

NewTenantValidator creates a new TenantValidator with default forbidden values.

func (*TenantValidator) ValidateTenantName

func (v *TenantValidator) ValidateTenantName(tenantName string) error

ValidateTenantName validates a single tenant name for common business rules. This validates: forbidden values and basic naming rules. Duplicate checking is handled separately as it requires context of all tenants.

func (*TenantValidator) ValidateTenantNames

func (v *TenantValidator) ValidateTenantNames(tenantNames []string) error

ValidateTenantNames validates a list of tenant names for all common rules. This combines forbidden value checking and duplicate detection.

func (*TenantValidator) ValidateUniqueNames

func (v *TenantValidator) ValidateUniqueNames(tenantNames []string) error

ValidateUniqueNames validates that all tenant names in the slice are unique.

Jump to

Keyboard shortcuts

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