markers

package
v0.0.2-rc2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllDefinitions []*definitionWithHelp

AllDefinitions contains all marker definitions for this package.

View Source
var XRDMarkers = []*definitionWithHelp{
	must(markers.MakeDefinition("crossbuilder:generate:xrd:claimNames", markers.DescribesType, ClaimNames{})),
	must(markers.MakeDefinition("crossbuilder:generate:xrd:defaultCompositionRef", markers.DescribesType, DefaultCompositionRef{})),
	must(markers.MakeDefinition("crossbuilder:generate:xrd:enforcedCompositionRef", markers.DescribesType, EnforcedCompositionRef{})),
	must(markers.MakeDefinition("crossbuilder:generate:xrd:defaultCompositeDeletePolicy", markers.DescribesType, DefaultCompositeDeletePolicy{})),
}

XRDMarkers lists all markers that directly modify the XRD (not validation schemas).

Functions

func Register

func Register(reg *markers.Registry) error

Register registers all definitions for CRD generation to the given registry.

Types

type ClaimNames

type ClaimNames struct {
	Kind       string   `marker:"kind"`
	Plural     string   `marker:"plural"`
	Singular   string   `marker:"singular,optional"`
	ShortNames []string `marker:"shortNames,optional"`
	ListKind   string   `marker:"listKind,optional"`
	Categories []string `marker:"categories,optional"`
}

ClaimNames is a marker to specify claim names for generated XRDs.

func (ClaimNames) ApplyToXRD

func (c ClaimNames) ApplyToXRD(xrd *xapiext.CompositeResourceDefinition, version string) error

ApplyToXRD applies the claim names to the XRD.

type DefaultCompositeDeletePolicy

type DefaultCompositeDeletePolicy struct {
	Policy xpv1.CompositeDeletePolicy `marker:"policy"`
}

DefaultCompositeDeletePolicy is a marker to specify the default composite delete policy of an XRD.

func (DefaultCompositeDeletePolicy) ApplyToXRD

ApplyToXRD applies the enforced composition ref to the XRD.

type DefaultCompositionRef

type DefaultCompositionRef struct {
	Name string `marker:"name"`
}

DefaultCompositionRef is a marker to specify the default composition ref of an XRD.

func (DefaultCompositionRef) ApplyToXRD

ApplyToXRD applies the default composition ref to the XRD.

type EnforcedCompositionRef

type EnforcedCompositionRef struct {
	Name string `marker:"name"`
}

EnforcedCompositionRef is a marker to specify the enforced composition ref of an XRD.

func (EnforcedCompositionRef) ApplyToXRD

ApplyToXRD applies the enforced composition ref to the XRD.

Jump to

Keyboard shortcuts

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