expansion

package
v3.17.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ChildStatLabel = "Implied by"
)

Variables

View Source
var (
	ExpansionEnabled *bool
)

Functions

func AggregateResponses

func AggregateResponses(templateName string, parent *types.Responses, child *types.Responses)

AggregateResponses aggregates all responses from children into the parent. Child result messages will be prefixed with a string to indicate the msg is implied by a ExpansionTemplate.

func AggregateStats

func AggregateStats(templateName string, parent *types.Responses, child *types.Responses)

AggregateStats aggregates all stats from the child Responses.StatsEntry into the parent Responses.StatsEntry. Child Stats will have a label to indicate that they come from an ExpansionTemplate usage.

func OverrideEnforcementAction

func OverrideEnforcementAction(action string, resps *types.Responses)

func ValidateTemplate

func ValidateTemplate(template *expansionunversioned.ExpansionTemplate) error

Types

type IDSet

type IDSet map[TemplateID]bool

type Resultant

type Resultant struct {
	Obj               *unstructured.Unstructured
	TemplateName      string
	EnforcementAction string
}

type System

type System struct {
	// contains filtered or unexported fields
}

func NewSystem

func NewSystem(mutationSystem *mutation.System) *System

func (*System) Expand

func (s *System) Expand(base *mutationtypes.Mutable) ([]*Resultant, error)

Expand expands `base` into resultant resources, and applies any applicable mutators. If no ExpansionTemplates match `base`, an empty slice will be returned. If `s.mutationSystem` is nil, no mutations will be applied.

func (*System) GetConflicts

func (s *System) GetConflicts() IDSet

func (*System) RemoveTemplate

func (s *System) RemoveTemplate(template *expansionunversioned.ExpansionTemplate) error

func (*System) UpsertTemplate

func (s *System) UpsertTemplate(template *expansionunversioned.ExpansionTemplate) error

type TemplateID

type TemplateID string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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