component

package
v0.6.19 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	ErrCrdGenerateCode = "11088"
	ErrDefinitionCode  = "11090"
	ErrGetSchemaCode   = "11091"
)
View Source
const ComponentMetaNameKey = "name"

Variables

View Source
var DefaultPathConfig = CuePathConfig{
	NamePath:       "spec.names.kind",
	IdentifierPath: "spec.names.kind",
	VersionPath:    "spec.versions[0].name",
	GroupPath:      "spec.group",
	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",
	SpecPath:       "spec.validation.openAPIV3Schema.properties.spec",
}

Functions

func ErrCrdGenerate

func ErrCrdGenerate(err error) error

func ErrGetDefinition

func ErrGetDefinition(err error) error

func ErrGetSchema

func ErrGetSchema(err error) error

func Generate

func Generate(crd string) (v1alpha1.ComponentDefinition, error)

Types

type CuePathConfig

type CuePathConfig struct {
	NamePath    string
	GroupPath   string
	VersionPath string
	SpecPath    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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL