generator

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResourceGraphDefinition

func NewResourceGraphDefinition(name string, opts ...ResourceGraphDefinitionOption) *krov1alpha1.ResourceGraphDefinition

NewResourceGraphDefinition creates a new ResourceGraphDefinition with the given name and options

Types

type ResourceGraphDefinitionOption

type ResourceGraphDefinitionOption func(*krov1alpha1.ResourceGraphDefinition)

ResourceGraphDefinitionOption is a functional option for ResourceGraphDefinition

func WithExternalRef

func WithExternalRef(
	id string,
	externalRef *krov1alpha1.ExternalRef,
	readyWhen []string,
	includeWhen []string,
) ResourceGraphDefinitionOption

WithExternalRef adds an external reference to the ResourceGraphDefinition with the given name and definition readyWhen and includeWhen expressions are optional.

func WithExternalRefAndForEach added in v0.8.0

func WithExternalRefAndForEach(
	id string,
	externalRef *krov1alpha1.ExternalRef,
	forEach []krov1alpha1.ForEachDimension,
) ResourceGraphDefinitionOption

WithExternalRefAndForEach adds an external reference with forEach iterators. This is an invalid combination and should fail validation - used for testing.

func WithResource

func WithResource(
	id string,
	template map[string]interface{},
	readyWhen []string,
	includeWhen []string,
) ResourceGraphDefinitionOption

WithResource adds a resource to the ResourceGraphDefinition with the given name and definition readyWhen and includeWhen expressions are optional.

func WithResourceCollection added in v0.8.0

func WithResourceCollection(
	id string,
	template map[string]interface{},
	forEach []krov1alpha1.ForEachDimension,
	readyWhen []string,
	includeWhen []string,
) ResourceGraphDefinitionOption

WithResourceCollection adds a collection resource with forEach iterators to the ResourceGraphDefinition.

func WithSchema

func WithSchema(kind, version string, spec, status map[string]interface{}, opts ...SchemaOption) ResourceGraphDefinitionOption

WithSchema sets the definition and status of the ResourceGraphDefinition and optionally applies schema options like WithTypes

type SchemaOption added in v0.6.2

type SchemaOption func(*krov1alpha1.Schema)

SchemaOption is a functional option for Schema

func WithScope added in v0.9.0

func WithScope(scope krov1alpha1.ResourceScope) SchemaOption

WithScope returns a SchemaOption that sets the CRD scope (Namespaced or Cluster).

func WithTypes added in v0.6.2

func WithTypes(types map[string]interface{}) SchemaOption

WithTypes returns a SchemaOption that sets the types for the schema

Jump to

Keyboard shortcuts

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