sliceofstruct

package
v0.35.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 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_OtherStruct

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

Validate_OtherStruct validates an instance of OtherStruct according to declarative validation rules in the API schema.

func Validate_OtherTypedefStruct

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

Validate_OtherTypedefStruct validates an instance of OtherTypedefStruct according to declarative validation rules in the API schema.

func Validate_Struct

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

Validate_Struct validates an instance of Struct according to declarative validation rules in the API schema.

Types

type OtherStruct

type OtherStruct struct{}

+k8s:validateFalse="type OtherStruct"

type OtherTypedefStruct

type OtherTypedefStruct OtherStruct

+k8s:validateFalse="type OtherTypedefStruct"

type Struct

type Struct struct {
	TypeMeta int

	// +k8s:validateFalse="field Struct.ListField"
	// +k8s:eachVal=+k8s:validateFalse="field Struct.ListField[*]"
	ListField []OtherStruct `json:"listField"`

	// +k8s:validateFalse="field Struct.ListTypedefField"
	// +k8s:eachVal=+k8s:validateFalse="field Struct.ListTypedefField[*]"
	ListTypedefField []OtherTypedefStruct `json:"listTypedefField"`

	UnvalidatedListField []OtherStruct `json:"UnvalidatedListField"`
}

+k8s:validateFalse="type Struct"

Jump to

Keyboard shortcuts

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