parameter

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Token = "PARAMETER"
)

Variables

This section is empty.

Functions

func TransformNode

func TransformNode(
	parseCtx interface{},
	node parsley.Node,
	blockID conflow.ID,
	paramNames map[conflow.ID]struct{},
) (conflow.ParameterNode, parsley.Error)

Types

type Container

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

Container is a parameter container

func NewContainer

func NewContainer(
	evalCtx *conflow.EvalContext,
	node conflow.ParameterNode,
	parent conflow.BlockContainer,
	value interface{},
	wgs []conflow.WaitGroup,
	pending bool,
) *Container

NewContainer creates a new parameter container

func (*Container) BlockContainer

func (c *Container) BlockContainer() conflow.BlockContainer

BlockContainer returns with the parent block container

func (*Container) Cancel

func (c *Container) Cancel() bool

func (*Container) Close

func (c *Container) Close()

Close notifies all wait groups

func (*Container) EvalStage

func (c *Container) EvalStage() conflow.EvalStage

func (*Container) JobID

func (c *Container) JobID() int

ID returns with the block id

func (*Container) JobName

func (c *Container) JobName() conflow.ID

JobName returns with the job name

func (*Container) Lightweight

func (c *Container) Lightweight() bool

func (*Container) Node

func (c *Container) Node() conflow.Node

Node returns with the parameter node

func (*Container) Pending

func (c *Container) Pending() bool

func (*Container) Run

func (c *Container) Run()

Run evaluates the parameter

func (*Container) SetJobID

func (c *Container) SetJobID(id int)

SetJobID sets the job id

func (*Container) Value

func (c *Container) Value() (interface{}, parsley.Error)

Value returns with the parameter value or an evaluation error

func (*Container) WaitGroups

func (c *Container) WaitGroups() []conflow.WaitGroup

WaitGroups returns nil

type Node

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

Node is a block parameter

func NewNode

func NewNode(
	blockID conflow.ID,
	nameNode *conflow.IDNode,
	valueNode parsley.Node,
	isDeclaration bool,
	directives []conflow.BlockNode,
) *Node

NewNode creates a new block parameter node

func (*Node) CreateContainer

func (n *Node) CreateContainer(
	ctx *conflow.EvalContext,
	_ conflow.RuntimeConfig,
	parent conflow.BlockContainer,
	value interface{},
	wgs []conflow.WaitGroup,
	pending bool,
) conflow.JobContainer

func (*Node) Dependencies

func (n *Node) Dependencies() conflow.Dependencies

Dependencies returns the blocks/parameters this parameter depends on

func (*Node) Directives

func (n *Node) Directives() []conflow.BlockNode

Directives returns the parameter directives

func (*Node) EvalStage

func (n *Node) EvalStage() conflow.EvalStage

EvalStage returns with the evaluation stage

func (*Node) Generates

func (n *Node) Generates() []conflow.ID

Generates returns with nil as a parameter node doesn't generate other nodes

func (*Node) ID

func (n *Node) ID() conflow.ID

ID returns with the name of the parameter

func (*Node) IsDeclaration

func (n *Node) IsDeclaration() bool

IsDeclaration returns true if the parameter was declared in the block

func (*Node) Name

func (n *Node) Name() conflow.ID

ID returns with the name of the parameter

func (*Node) Pos

func (n *Node) Pos() parsley.Pos

Pos returns the position

func (*Node) Provides

func (n *Node) Provides() []conflow.ID

Provides returns with nil as a parameter node doesn't define other nodes

func (*Node) ReaderPos

func (n *Node) ReaderPos() parsley.Pos

ReaderPos returns the position of the first character immediately after this node

func (*Node) Schema

func (n *Node) Schema() interface{}

Schema returns the schema for the node's value

func (*Node) SetSchema

func (n *Node) SetSchema(s schema.Schema)

SetSchema sets the schema for the parameter node

func (*Node) StaticCheck

func (n *Node) StaticCheck(ctx interface{}) parsley.Error

StaticCheck runs a static analysis on the value node

func (*Node) String

func (n *Node) String() string

String returns with a string representation of the node

func (*Node) Token

func (n *Node) Token() string

Token returns with the node token

func (*Node) Value

func (n *Node) Value(ctx interface{}) (interface{}, parsley.Error)

Value returns with the value of the node

func (*Node) ValueNode

func (n *Node) ValueNode() parsley.Node

ValueNode returns with the value node

func (*Node) Walk

func (n *Node) Walk(f func(n parsley.Node) bool) bool

Walk runs the given function on all child nodes

Jump to

Keyboard shortcuts

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