variable

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info interface {
	Name() string
	Description() string
	SetDescription(description string)
}

type JsonContainer

type JsonContainer struct {
	Variable Variable
}

func (JsonContainer) MarshalJSON

func (jc JsonContainer) MarshalJSON() ([]byte, error)

func (*JsonContainer) UnmarshalJSON

func (jc *JsonContainer) UnmarshalJSON(b []byte) (err error)

type Reference

type Reference interface {
	Reference() Variable
}

type System

type System interface {
	Variables() []Info
	Add(path string, variable Variable) error
	Variable(path string) (Variable, error)
	Info(path string) (Info, error)
	Exists(path string) bool
	Remove(path string) error
	Move(oldName, newName string) error
	Traverse(func(path string, info Info, v Variable))
	PersistedSchema() (schema.NestedGroup[schema.PersistedVariable], error)
	RuntimeSchema() (schema.NestedGroup[schema.RuntimeVariable], error)
}

System Kinda copies/inspired by file systems

func NewSystem

func NewSystem() System

type TypeVariable

type TypeVariable[T any] struct {
	// contains filtered or unexported fields
}

func (*TypeVariable[T]) ApplyMessage

func (tv *TypeVariable[T]) ApplyMessage(msg []byte) (bool, error)

func (*TypeVariable[T]) GetValue

func (tv *TypeVariable[T]) GetValue() T

func (*TypeVariable[T]) Info

func (tv *TypeVariable[T]) Info() Info

func (TypeVariable[T]) MarshalJSON

func (tv TypeVariable[T]) MarshalJSON() ([]byte, error)

func (*TypeVariable[T]) NodeReference

func (tv *TypeVariable[T]) NodeReference() nodes.Node

func (*TypeVariable[T]) SetValue

func (tv *TypeVariable[T]) SetValue(v T)

func (TypeVariable[T]) ToMessage

func (tv TypeVariable[T]) ToMessage() []byte

func (*TypeVariable[T]) Version

func (tv *TypeVariable[T]) Version() int

type Variable

type Variable interface {
	NodeReference() nodes.Node

	Info() Info

	ApplyMessage(msg []byte) (bool, error)
	ToMessage() []byte
	// contains filtered or unexported methods
}

func DeserializeVariable

func DeserializeVariable(msg json.RawMessage) (Variable, error)

type VariableReferenceNode

type VariableReferenceNode[T any] struct {
	// contains filtered or unexported fields
}

func (*VariableReferenceNode[T]) Description

func (tv *VariableReferenceNode[T]) Description() string

func (*VariableReferenceNode[T]) Inputs

func (vrn *VariableReferenceNode[T]) Inputs() map[string]nodes.InputPort

func (*VariableReferenceNode[T]) Name

func (tv *VariableReferenceNode[T]) Name() string

func (*VariableReferenceNode[T]) Outputs

func (vrn *VariableReferenceNode[T]) Outputs() map[string]nodes.OutputPort

func (*VariableReferenceNode[T]) Reference

func (vrn *VariableReferenceNode[T]) Reference() Variable

Jump to

Keyboard shortcuts

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