definitions

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDefinitionsForKeysGo

func ApplyDefinitionsForKeysGo(csv *v1alpha1.ClusterServiceVersion, apisRootDir string, gvks []schema.GroupVersionKind) error

ApplyDefinitionsForKeysGo collects markers and AST info on Go type declarations and struct fields to populate csv spec fields. Go code with relevant markers and information is expected to be in a package under apisRootDir and match a GVK in keys.

func MakeFullGroupFromName

func MakeFullGroupFromName(name string) string

MakeFullGroupFromName returns everything but the first element of a CRD name, which by definition is <resource>.<full group>.

func MakeGroupFromFullGroup

func MakeGroupFromFullGroup(group string) string

MakeGroupFromFullGroup returns the first element of an API group, ex. "foo" of "foo.example.com".

Types

type Description

type Description struct {
	// Resources is a list of string lists, each of which defines a CRD description resource. The marker format is:
	// { { "kind" , "version" ( , "name")? } , ... }
	Resources Resources `marker:",optional"`
	// DisplayName is the displayName of a CRD description.
	DisplayName string `marker:",optional"`
	// Order determines which position in the list this description will take.
	// Markers with Order omitted have the highest Order, i.e. at the end of the list.
	// If more than one marker has the same Order, the corresponding descriptions
	// will be sorted alphabetically and placed above others with higher Orders.
	Order *int `marker:",optional"`
}

Description is a type used to receive type-level CRD description markers.

func (Description) Help

type Descriptor

type Descriptor struct {
	// Type is one of: "spec", "status".
	Type string `marker:",optional"`
	// DisplayName is the displayName of a spec or status description.
	DisplayName string `marker:",optional"`
	// XDescriptors is a list of UI path strings. The marker format is:
	// "ui:element:foo,ui:element:bar"
	XDescriptors []string `marker:",optional"`
	// Order determines which position in the list this descriptor will take.
	// Markers with Order omitted have the highest Order, i.e. at the end of the list.
	// If more than one marker has the same Order, the corresponding descriptors
	// will be sorted alphabetically and placed above others with higher Orders.
	Order *int `marker:",optional"`
}

Descriptor is a type used to receive field-level spec and status descriptor markers. Format of marker:

func (Descriptor) Help

type Resource

type Resource []string

Resource is a list of strings defining a CRD description resource.

type Resources

type Resources []Resource

Resources is a list of resource definitions.

Jump to

Keyboard shortcuts

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