Documentation
¶
Overview ¶
This is a test package.
Index ¶
- func RegisterValidations(scheme *testscheme.Scheme) error
- func Validate_T00(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_T01(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_T02(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_T03(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_TMultiple(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_Tother(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- type T00
- type T01
- type T02
- type T03
- type TMultiple
- type Tother
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_T01 ¶
func Validate_T02 ¶
func Validate_T03 ¶
func Validate_TMultiple ¶
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"}