tfconfig

package
v0.0.0-...-070373f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchStep

type BatchStep struct {
	Steps []Step
}

func (*BatchStep) Run

func (step *BatchStep) Run(tree *tftree.SpanTree)

type Config

type Config struct {
	// The config ID, used to generate the cache ID.
	Id Id
	// The config name, used in search page display.
	Name string
	// Base config name without modifiers, used to help reconstruct the name.
	BaseName string
	// Names of modifiers, used to help reconstruct the name.
	ModifierNames sets.Set[string]
	// Only links with roles in this set are followed.
	LinkSelector LinkSelector
	// The extension traces for this config.
	Extensions []extension.Provider
	// The steps to transform the tree
	Steps []Step
}

func (*Config) Clone

func (config *Config) Clone() *Config

func (*Config) RecomputeName

func (config *Config) RecomputeName()

type ConstantLinkSelector

type ConstantLinkSelector bool

func (ConstantLinkSelector) Admit

func (selector ConstantLinkSelector) Admit(
	parent utilobject.Key,
	child utilobject.Key,
	parentIsSource bool,
	linkClass string,
) LinkSelector

type Id

type Id uint32

func (*Id) UnmarshalText

func (id *Id) UnmarshalText(text []byte) error

type IntersectLinkSelector

type IntersectLinkSelector []LinkSelector

func (IntersectLinkSelector) Admit

func (selector IntersectLinkSelector) Admit(
	parentKey utilobject.Key,
	childKey utilobject.Key,
	parentIsSource bool,
	linkClass string,
) LinkSelector

type LinkSelector

type LinkSelector interface {
	// Whether to follow the given link.
	//
	// If link should be followed, return a non-nil LinkSelector.
	// The returned object will be used to recursively follow links in the linked object.
	Admit(parent utilobject.Key, child utilobject.Key, parentIsSource bool, linkClass string) LinkSelector
}

type Modifier

type Modifier interface {
	// Modifiers with the same class are incompatible with one another.
	// Used to reduce cardinality of available display modes in frontend.
	ModifierClass() string

	Modify(config *Config)
}

type ModifierFactory

type ModifierFactory interface {
	manager.IndexedListImpl

	Build(jsonBuf []byte) (Modifier, error)
}

type Provider

type Provider interface {
	Names() []string
	DefaultName() string
	DefaultId() Id
	GetByName(name string) *Config
	GetById(id Id) *Config
}

type RegisteredStep

type RegisteredStep interface {
	Step
	manager.IndexedListImpl

	Kind() string

	UnmarshalNewJSON(buf []byte) (Step, error)
}

type RegisteredVisitor

type RegisteredVisitor interface {
	tftree.TreeVisitor

	Kind() string
}

type Step

type Step interface {
	Run(tree *tftree.SpanTree)
}

func ParseSteps

func ParseSteps(buf []byte, batches map[string][]Step, registeredSteps map[string]RegisteredStep) ([]Step, error)

func UnmarshalStep

func UnmarshalStep(batches map[string][]Step, buf []byte, registeredSteps map[string]RegisteredStep) (Step, error)

type UnionLinkSelector

type UnionLinkSelector []LinkSelector

func (UnionLinkSelector) Admit

func (selector UnionLinkSelector) Admit(
	parentKey utilobject.Key,
	childKey utilobject.Key,
	parentIsSource bool,
	linkClass string,
) LinkSelector

type VisitorStep

type VisitorStep[V RegisteredVisitor] struct {
	manager.BaseComponent

	Visitor V `managerSkipFill:""`
}

func (*VisitorStep[V]) Kind

func (step *VisitorStep[V]) Kind() string

func (*VisitorStep[V]) ListIndex

func (step *VisitorStep[V]) ListIndex() string

func (*VisitorStep[V]) Options

func (step *VisitorStep[V]) Options() manager.Options

func (*VisitorStep[V]) Run

func (step *VisitorStep[V]) Run(tree *tftree.SpanTree)

func (*VisitorStep[V]) UnmarshalJSON

func (step *VisitorStep[V]) UnmarshalJSON(buf []byte) error

func (*VisitorStep[V]) UnmarshalNewJSON

func (*VisitorStep[V]) UnmarshalNewJSON(buf []byte) (Step, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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