defaultbehavior

package
v0.34.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

This is a test package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterValidations

func RegisterValidations(scheme *testscheme.Scheme) error

RegisterValidations adds validation functions to the given scheme. Public to allow building arbitrary schemes.

func Validate_AliasMapKeyType

func Validate_AliasMapKeyType(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj AliasMapKeyType) (errs field.ErrorList)

func Validate_AliasMapValueType

func Validate_AliasMapValueType(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj AliasMapValueType) (errs field.ErrorList)

func Validate_DirectComparableStruct

func Validate_DirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *DirectComparableStruct) (errs field.ErrorList)

func Validate_MySlice

func Validate_MySlice(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj MySlice) (errs field.ErrorList)

func Validate_NestedDirectComparableStruct

func Validate_NestedDirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *NestedDirectComparableStruct) (errs field.ErrorList)

func Validate_NestedNonDirectComparableStruct

func Validate_NestedNonDirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *NestedNonDirectComparableStruct) (errs field.ErrorList)

func Validate_NonDirectComparableStruct

func Validate_NonDirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *NonDirectComparableStruct) (errs field.ErrorList)

func Validate_S

func Validate_S(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *S) (errs field.ErrorList)

func Validate_StructEmbedded

func Validate_StructEmbedded(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *StructEmbedded) (errs field.ErrorList)

func Validate_StructMap

func Validate_StructMap(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *StructMap) (errs field.ErrorList)

func Validate_StructPrimitive

func Validate_StructPrimitive(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *StructPrimitive) (errs field.ErrorList)

func Validate_StructSlice

func Validate_StructSlice(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *StructSlice) (errs field.ErrorList)

func Validate_StructStruct

func Validate_StructStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, obj, oldObj *StructStruct) (errs field.ErrorList)

Types

type AliasMapKeyType

type AliasMapKeyType MapKeyType

+k8s:validateFalse="type MapKeyType"

type AliasMapValueType

type AliasMapValueType MapValueType

+k8s:validateFalse="type MapValueType"

type DirectComparableStruct

type DirectComparableStruct struct {
	// +k8s:validateFalse="field intField"
	IntField int `json:"intField"`
}

+k8s:validateFalse="type DirectComparableStruct"

type MapKeyType

type MapKeyType map[S]string

no validation

type MapValueType

type MapValueType map[string]S

no validation

type MySlice

type MySlice []int

+k8s:validateFalse="type MySlice"

type NestedDirectComparableStruct

type NestedDirectComparableStruct struct {
	// +k8s:validateFalse="field intField"
	DirectComparableStructField DirectComparableStruct `json:"directComparableStructField"`
}

+k8s:validateFalse="type NestedDirectComparableStruct"

type NestedNonDirectComparableStruct

type NestedNonDirectComparableStruct struct {
	// +k8s:validateFalse="field intField"
	NonDirectComparableStructField NonDirectComparableStruct `json:"nonDirectComparableStructField"`
}

+k8s:validateFalse="type NestedNonDirectComparableStruct"

type NonDirectComparableStruct

type NonDirectComparableStruct struct {
	// +k8s:validateFalse="field intField"
	IntPtrField *int `json:"intPtrField"`
}

+k8s:validateFalse="type NonDirectComparableStruct"

type S

type S string

+k8s:validateFalse="type S"

type StructEmbedded

type StructEmbedded struct {
	TypeMeta int
	// +k8s:validateFalse="field DirectComparableStruct"
	DirectComparableStruct `json:"directComparableStruct"`

	// +k8s:validateFalse="field NonDirectComparableStruct"
	NonDirectComparableStruct `json:"nonDirectComparableStruct"`

	// +k8s:validateFalse="field NestedDirectComparableStructField"
	NestedDirectComparableStructField NestedDirectComparableStruct `json:"nestedDirectComparableStructField"`

	// +k8s:validateFalse="field NestedNonDirectComparableStructField"
	NestedNonDirectComparableStructField NestedNonDirectComparableStruct `json:"nestedNonDirectComparableStructField"`
}

type StructMap

type StructMap struct {
	TypeMeta int

	// +k8s:validateFalse="field mapKeyField"
	MapKeyField map[S]string `json:"mapKeyField"`

	// +k8s:validateFalse="field mapValueField"
	MapValueField map[string]S `json:"mapValueField"`

	// +k8s:validateFalse="field aliasMapKeyTypeField"
	AliasMapKeyTypeField AliasMapKeyType `json:"aliasMapKeyTypeField"`

	// +k8s:validateFalse="field aliasMapValueTypeField"
	AliasMapValueTypeField AliasMapValueType `json:"aliasMapValueTypeField"`
}

type StructPrimitive

type StructPrimitive struct {
	TypeMeta int

	// +k8s:validateFalse="field intField"
	IntField int `json:"intField"`

	// +k8s:optional
	// +k8s:validateFalse="field intPtrField"
	IntPtrField *int `json:"intPtrField"`
}

type StructSlice

type StructSlice struct {
	TypeMeta int

	// +k8s:validateFalse="field sliceField"
	SliceField []S `json:"sliceField"`

	// +k8s:validateFalse="field typedefSliceField"
	TypeDefSliceField MySlice `json:"typedefSliceField"`
}

type StructStruct

type StructStruct struct {
	TypeMeta int

	// +k8s:validateFalse="field directComparableStructField"
	DirectComparableStructField DirectComparableStruct `json:"directComparableStructField"`

	// +k8s:validateFalse="field nonDirectComparableStructField"
	NonDirectComparableStructField NonDirectComparableStruct `json:"nonDirectComparableStructField"`

	// +k8s:validateFalse="field directComparableStructPtrField"
	DirectComparableStructPtr *DirectComparableStruct `json:"directComparableStructPtrField"`

	// +k8s:validateFalse="field nonDirectComparableStructPtrField"
	NonDirectComparableStructPtr *NonDirectComparableStruct `json:"nonDirectComparableStructPtrField"`

	// +k8s:validateFalse="field DirectComparableStruct"
	DirectComparableStruct

	// +k8s:validateFalse="field NonDirectComparableStruct"
	NonDirectComparableStruct
}

type TypeDefStruct

type TypeDefStruct struct{}

+k8s:validateFalse="type TypeDefStruct"

Jump to

Keyboard shortcuts

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