validation

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Validate *validator.Validate
)

Functions

func FormDataBodyValidate

func FormDataBodyValidate(w http.ResponseWriter, r *http.Request, structData any) error

func GetTranslation

func GetTranslation(lang string) ut.Translator

func JSONBodyReadAndValidate

func JSONBodyReadAndValidate(w http.ResponseWriter, r *http.Request, structData any) error

func URLParamsValidate

func URLParamsValidate(ctx context.Context, w http.ResponseWriter, structData any) error

func ValidateDNS1035Label

func ValidateDNS1035Label(fl validator.FieldLevel) bool

ValidateDNS1035Label validates RFC 1035 DNS label names Used by some specific Kubernetes resources

func ValidateDNS1123Label

func ValidateDNS1123Label(fl validator.FieldLevel) bool

ValidateDNS1123Label validates RFC 1123 DNS label names Used by container names, port names, etc.

func ValidateDNS1123Subdomain

func ValidateDNS1123Subdomain(fl validator.FieldLevel) bool

ValidateDNS1123Subdomain validates RFC 1123 DNS subdomain names Used by most Kubernetes resources

func ValidateKubeconfig

func ValidateKubeconfig(fl validator.FieldLevel) bool

ValidateKubeconfig validates that a string contains a valid kubeconfig YAML with required clusters, contexts, and users sections.

Types

This section is empty.

Jump to

Keyboard shortcuts

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