structs

package
v0.33.0-alpha.3 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 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_T00

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

func Validate_T01

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

func Validate_T02

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

func Validate_T03

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

func Validate_TMultiple

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

func Validate_Tother

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

Types

type T00

type T00 struct {
	TypeMeta int
	S        string  `json:"s"`
	PS       *string `json:"ps"`
	T        Tother  `json:"t"`
	PT       *Tother `json:"pt"`
}

Note: No validations.

type T01

type T01 struct {
	TypeMeta int
	// +k8s:validateFalse={"flags":[], "msg":"T01.S, no flags"}
	S string `json:"s"`
	// +k8s:validateFalse={"flags":[], "msg":"T01.PS, no flags"}
	PS *string `json:"ps"`
	// +k8s:validateFalse={"flags":[], "msg":"T01.T, no flags"}
	T Tother `json:"t"`
	// +k8s:validateFalse={"flags":[], "msg":"T01.PT, no flags"}
	PT *Tother `json:"pt"`
}

+k8s:validateFalse={"flags":[], "msg":"T01, no flags"}

type T02

type T02 struct {
	TypeMeta int
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T02.S, ShortCircuit"}
	S string `json:"s"`
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T02.PS, ShortCircuit"}
	PS *string `json:"ps"`
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T02.T, ShortCircuit"}
	T Tother `json:"t"`
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T02.PT, ShortCircuit"}
	PT *Tother `json:"pt"`
}

+k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T02, ShortCircuit"}

type T03

type T03 struct {
	TypeMeta int
	// +k8s:validateFalse={"flags":[], "msg":"T03.S, no flags"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T03.S, ShortCircuit"}
	S string `json:"s"`
	// +k8s:validateFalse={"flags":[], "msg":"T03.PS, no flags"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T03.PS, ShortCircuit"}
	PS *string `json:"ps"`
	// +k8s:validateFalse={"flags":[], "msg":"T03.T, no flags"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T03.T, ShortCircuit"}
	T Tother `json:"t"`
	// +k8s:validateFalse={"flags":[], "msg":"T03.PT, no flags"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T03.PT, ShortCircuit"}
	PT *Tother `json:"pt"`
}

+k8s:validateFalse={"flags":[], "msg":"T03, no flags"} +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"T03, ShortCircuit"}

type TMultiple

type TMultiple struct {
	TypeMeta int
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.S, no flags 1"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.S, ShortCircuit 1"}
	// +k8s:validateFalse="T0, string payload"
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.S, no flags 2"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.S, ShortCircuit 2"}
	S string `json:"s"`
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.PS, no flags 1"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.PS, ShortCircuit 1"}
	// +k8s:validateFalse="T0, string payload"
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.PS, no flags 2"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.PS, ShortCircuit 2"}
	PS *string `json:"ps"`
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.T, no flags 1"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.T, ShortCircuit 1"}
	// +k8s:validateFalse="T0, string payload"
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.T, no flags 2"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.T, ShortCircuit 2"}
	T Tother `json:"t"`
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.PT, no flags 1"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.PT, ShortCircuit 1"}
	// +k8s:validateFalse="T0, string payload"
	// +k8s:validateFalse={"flags":[], "msg":"TMultiple.PT, no flags 2"}
	// +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple.PT, ShortCircuit 2"}
	PT *Tother `json:"pt"`
}

Note: these are intentionally in the wrong final order. +k8s:validateFalse={"flags":[], "msg":"TMultiple, no flags 1"} +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple, ShortCircuit 1"} +k8s:validateFalse="T0, string payload" +k8s:validateFalse={"flags":[], "msg":"TMultiple, no flags 2"} +k8s:validateFalse={"flags":["ShortCircuit"], "msg":"TMultiple, ShortCircuit 2"}

type Tother

type Tother struct {
	// +k8s:validateFalse={"flags":[], "msg":"Tother, no flags"}
	OS string `json:"os"`
}

Jump to

Keyboard shortcuts

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