embedded

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: Apache-2.0 Imports: 7 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_T1

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

func Validate_T2

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

func Validate_T3

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

Types

type T1

type T1 struct {
	TypeMeta int

	// NOTE: It's weird to have IntField in both, but Go allows it.
	T2  `json:",inline"`
	*T3 `json:",inline"`
}

type T2

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

type T3

type T3 struct {
	// +k8s:validateFalse="T3.StringField"
	StringField string `json:"stringField"`

	// +k8s:validateFalse="T3.IntField"
	IntField int `json:"intField"`
}

Jump to

Keyboard shortcuts

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