Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrCrdGenerateCode = "11088" ErrDefinitionCode = "11090" ErrGetSchemaCode = "11091" )
View Source
const ComponentMetaNameKey = "name"
Variables ¶
View Source
var Configs = []CuePathConfig{DefaultPathConfig, DefaultPathConfig2}
View Source
var DefaultPathConfig = CuePathConfig{
NamePath: "spec.names.kind",
IdentifierPath: "spec.names.kind",
VersionPath: "spec.versions[0].name",
GroupPath: "spec.group",
ScopePath: "spec.scope",
SpecPath: "spec.versions[0].schema.openAPIV3Schema.properties.spec",
}
View Source
var DefaultPathConfig2 = CuePathConfig{
NamePath: "spec.names.kind",
IdentifierPath: "spec.names.kind",
VersionPath: "spec.versions[0].name",
GroupPath: "spec.group",
ScopePath: "spec.scope",
SpecPath: "spec.validation.openAPIV3Schema.properties.spec",
}
Functions ¶
func ErrCrdGenerate ¶
func ErrGetDefinition ¶
func ErrGetSchema ¶
Types ¶
type CuePathConfig ¶
type CuePathConfig struct { NamePath string GroupPath string VersionPath string SpecPath string ScopePath string // identifiers are the values that uniquely identify a CRD (in most of the cases, it is the 'Name' field) IdentifierPath string }
all paths should be a valid CUE expression
Click to show internal directories.
Click to hide internal directories.