Documentation
¶
Index ¶
- Variables
- func EnumJSON(enum []interface{}) []extensionsobj.JSON
- func GetCustomResourceValidation(name string, fns []GetAPIDefinitions) *extensionsobj.CustomResourceValidation
- func GetCustomResourceValidations(fn GetAPIDefinitions) map[string]*extensionsobj.CustomResourceValidation
- func OpenAPIRefCallBack(name string) spec.Ref
- func SchemPropsMapToJSONMap(schemaMap map[string]spec.Schema, ...) map[string]extensionsobj.JSONSchemaProps
- func SchemaOrArrayToJSONItems(schemaOrArray *spec.SchemaOrArray, ...) *extensionsobj.JSONSchemaPropsOrArray
- func SchemaOrBoolToJSONProps(schemaOrBool *spec.SchemaOrBool, ...) *extensionsobj.JSONSchemaPropsOrBool
- func SchemaPropsToJSONProps(schema *spec.Schema, openapiSpec map[string]common.OpenAPIDefinition, ...) *extensionsobj.JSONSchemaProps
- func SchemaPropsToJSONPropsArray(schemas []spec.Schema, openapiSpec map[string]common.OpenAPIDefinition, ...) []extensionsobj.JSONSchemaProps
- func StringOrArrayToString(strOrArray spec.StringOrArray) string
- type GetAPIDefinitions
Constants ¶
This section is empty.
Variables ¶
var CustomResourceDefinitionTypeMeta = metav1.TypeMeta{
Kind: "CustomResourceDefinition",
APIVersion: "apiextensions.k8s.io/v1beta1",
}
CustomResourceDefinitionTypeMeta set the default kind/apiversion of CRD
Functions ¶
func EnumJSON ¶
func EnumJSON(enum []interface{}) []extensionsobj.JSON
EnumJSON converts []interface{} to []JSON
func GetCustomResourceValidation ¶
func GetCustomResourceValidation(name string, fns []GetAPIDefinitions) *extensionsobj.CustomResourceValidation
GetCustomResourceValidation returns the validation definition for a CRD name
func GetCustomResourceValidations ¶
func GetCustomResourceValidations(fn GetAPIDefinitions) map[string]*extensionsobj.CustomResourceValidation
GetCustomResourceValidations returns a CRD validation spec map. It took the openapi generated definition from kube-openapi as argument
func OpenAPIRefCallBack ¶
OpenAPIRefCallBack returns a jsonref using the input string without modification
func SchemPropsMapToJSONMap ¶
func SchemPropsMapToJSONMap(schemaMap map[string]spec.Schema, openapiSpec map[string]common.OpenAPIDefinition, nested bool) map[string]extensionsobj.JSONSchemaProps
SchemPropsMapToJSONMap converts map[string]Schema to map[string]JSONSchemaProps
func SchemaOrArrayToJSONItems ¶
func SchemaOrArrayToJSONItems(schemaOrArray *spec.SchemaOrArray, openapiSpec map[string]common.OpenAPIDefinition, nested bool) *extensionsobj.JSONSchemaPropsOrArray
SchemaOrArrayToJSONItems converts *SchemaOrArray to *JSONSchemaPropsOrArray
func SchemaOrBoolToJSONProps ¶
func SchemaOrBoolToJSONProps(schemaOrBool *spec.SchemaOrBool, openapiSpec map[string]common.OpenAPIDefinition, nested bool) *extensionsobj.JSONSchemaPropsOrBool
SchemaOrBoolToJSONProps converts *SchemaOrBool to *JSONSchemaPropsOrBool
func SchemaPropsToJSONProps ¶
func SchemaPropsToJSONProps(schema *spec.Schema, openapiSpec map[string]common.OpenAPIDefinition, nested bool) *extensionsobj.JSONSchemaProps
SchemaPropsToJSONProps converts a SchemaProps to a JSONProps
func SchemaPropsToJSONPropsArray ¶
func SchemaPropsToJSONPropsArray(schemas []spec.Schema, openapiSpec map[string]common.OpenAPIDefinition, nested bool) []extensionsobj.JSONSchemaProps
SchemaPropsToJSONPropsArray converts []Schema to []JSONSchemaProps
func StringOrArrayToString ¶
func StringOrArrayToString(strOrArray spec.StringOrArray) string
StringOrArrayToString converts StringOrArray to string
Types ¶
type GetAPIDefinitions ¶
type GetAPIDefinitions func(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition
GetAPIDefinition is a function returning a map with all Definition