Documentation
¶
Overview ¶
This is a test package.
Index ¶
- func RegisterValidations(scheme *testscheme.Scheme) error
- func Validate_AliasMapKeyType(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_AliasMapValueType(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_DirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_MySlice(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_NestedDirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_NestedNonDirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_NonDirectComparableStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_S(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_StructEmbedded(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_StructMap(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_StructPrimitive(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_StructSlice(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- func Validate_StructStruct(ctx context.Context, op operation.Operation, fldPath *field.Path, ...) (errs field.ErrorList)
- type AliasMapKeyType
- type AliasMapValueType
- type DirectComparableStruct
- type MapKeyType
- type MapValueType
- type MySlice
- type NestedDirectComparableStruct
- type NestedNonDirectComparableStruct
- type NonDirectComparableStruct
- type S
- type StructEmbedded
- type StructMap
- type StructPrimitive
- type StructSlice
- type StructStruct
- type TypeDefStruct
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_MySlice ¶
func Validate_S ¶
func Validate_StructEmbedded ¶
func Validate_StructMap ¶
func Validate_StructSlice ¶
Types ¶
type DirectComparableStruct ¶
type DirectComparableStruct struct {
// +k8s:validateFalse="field intField"
IntField int `json:"intField"`
}
+k8s:validateFalse="type DirectComparableStruct"
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 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 StructSlice ¶
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
}
Click to show internal directories.
Click to hide internal directories.