generator

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const CLAIMPATH definitionProperty = "claimPath"
View Source
const MANAGEDPATH definitionProperty = "managedPath"

Variables

This section is empty.

Functions

func EvaluateCondition

func EvaluateCondition(expression *string, data ConditonData) (bool, error)

EvaluateCondition will evaluate a CEL expression

func NewCELEnvironment

func NewCELEnvironment() (*cel.Env, error)

NewCELEnvironment sets up the CEL Environment

func ToCELVars

func ToCELVars(data ConditonData) map[string]any

ToCELVars formats a RunFunctionRequest for CEL evaluation

Types

type ConditonData

type ConditonData struct {
	TagProperty string
	TagType     string
}

type NamedComposition

type NamedComposition struct {
	Name        string
	Composition c.Composition
}

type OverrideFieldDefinition

type OverrideFieldDefinition struct {
	ClaimPath     string
	ManagedPath   string
	Schema        *v1.JSONSchemaProps
	Required      bool
	Replacement   bool
	PathSegments  []string
	Patches       []p.PatchSetPatch
	OriginalEnum  []v1.JSON
	Overwrites    *t.OverrideFieldInClaim
	IgnoreInClaim bool
}

type XGenerator

type XGenerator struct {
	Group                     string                      `yaml:"group" json:"group"`
	Name                      string                      `yaml:"name" json:"name"`
	Plural                    *string                     `yaml:"plural,omitempty" json:"plural,omitempty"`
	PatchExternalName         *bool                       `yaml:"patchExternalName,omitempty" json:"patchExternalName,omitempty"`
	PatchlName                *bool                       `yaml:"patchName,omitempty" json:"patchName,omitempty"`
	ConnectionSecretKeys      *[]string                   `yaml:"connectionSecretKeys,omitempty" json:"connectionSecretKeys,omitempty"`
	Compositions              []t.Composition             `yaml:"compositions" json:"compositions"`
	Version                   string                      `yaml:"version" json:"version"`
	Crd                       v1.CustomResourceDefinition `yaml:"crd" json:"crd"`
	Provider                  t.ProviderConfig            `yaml:"provider" json:"provider"`
	OverrideFields            []t.OverrideField           `yaml:"overrideFields" json:"overrideFields"`
	OverrideFieldsInClaim     []t.OverrideFieldInClaim    `yaml:"overrideFieldsInClaim" json:"overrideFieldsInClaim"`
	Labels                    t.LocalLabelConfig          `yaml:"labels,omitempty" json:"labels,omitempty"`
	ReadinessChecks           *bool                       `yaml:"readinessChecks,omitempty" json:"readinessChecks,omitempty"`
	UIDFieldPath              *string                     `yaml:"uidFieldPath,omitempty" json:"uidFieldPath,omitempty"`
	ExpandCompositionName     *bool                       `yaml:"expandCompositionName,omitempty" json:"expandCompositionName,omitempty"`
	AdditionalPipelineSteps   []t.PipelineStep            `yaml:"additionalPipelineSteps,omitempty" json:"additionalPipelineSteps,omitempty"`
	TagType                   *string                     `yaml:"tagType,omitempty" json:"tagType,omitempty"`
	TagProperty               *string                     `yaml:"tagProperty,omitempty" json:"tagProperty,omitempty"`
	AutoReadyFunction         *t.AutoReadyFunction        `yaml:"autoReadyFunction,omitempty" json:"autoReadyFunction,omitempty"`
	PatchAndTransfromFunction *string                     `yaml:"patchAndTransfromFunction,omitempty" json:"patchAndTransfromFunction,omitempty"`

	GlobalLabels    []string
	GeneratorConfig t.GeneratorConfig
	// contains filtered or unexported fields
}

func (*XGenerator) GenerateComposition

func (g *XGenerator) GenerateComposition() ([]NamedComposition, error)

func (*XGenerator) GenerateXRD

func (g *XGenerator) GenerateXRD() (*c.CompositeResourceDefinition, error)

Jump to

Keyboard shortcuts

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