Documentation
¶
Index ¶
Constants ¶
View Source
const ( Optional = "optional" Required = "required" Empty = "" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
OutputDir string
// AllowDangerousTypes allows types which are usually omitted from CRD generation
// because they are not recommended.
//
// Currently the following additional types are allowed when this is true:
// float32
// float64
//
// Left unspecified, the default is false
AllowDangerousTypes *bool `marker:",optional"`
}
Generator generates JSON schema objects.
func (Generator) CheckFilter ¶
func (Generator) CheckFilter() loader.NodeFilter
type GeneratorContext ¶
type GeneratorContext struct {
// contains filtered or unexported fields
}
func (*GeneratorContext) NeedSchemaFor ¶
func (context *GeneratorContext) NeedSchemaFor(typ crd.TypeIdent)
func (*GeneratorContext) TypeRefLink ¶
type ObjName ¶ added in v0.2.0
type ObjName string
func (ObjName) ApplyToSchema ¶ added in v0.2.0
func (n ObjName) ApplyToSchema(schema *apiext.JSONSchemaProps) error
type SchemaMarker ¶
type SchemaMarker interface {
// ApplyToSchema is called after the rest of the schema for a given type
// or field is generated, to modify the schema appropriately.
ApplyToSchema(*apiext.JSONSchemaProps) error
}
SchemaMarker is any marker that needs to modify the schema of the underlying type or field.
Click to show internal directories.
Click to hide internal directories.