graph

package
v0.37.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildNodeTypeSchema

func BuildNodeTypeSchema(registeredType string, node nodes.Node) schema.NodeType

func ForeachManifestNodeOutput added in v0.32.0

func ForeachManifestNodeOutput(i *Instance, f func(nodeId string, node nodes.Node, output nodes.Output[manifest.Manifest]) error) error

func RecurseDependenciesType

func RecurseDependenciesType[T any](dependent nodes.Node) []T

func SwaggerSpec added in v0.32.0

func SwaggerSpec(instance *Instance) swagger.Spec

func WriteManifestToZip added in v0.32.0

func WriteManifestToZip(i *Instance, zw *zip.Writer, nodeId string, node nodes.Node, out nodes.Output[manifest.Manifest]) error

func WriteMermaid added in v0.32.0

func WriteMermaid(a *Instance, out io.Writer) error

func WriteOutline added in v0.32.0

func WriteOutline(graph *Instance, out io.Writer) error

func WriteSwagger added in v0.32.0

func WriteSwagger(instance *Instance, out io.Writer) error

func WriteToFolder added in v0.32.0

func WriteToFolder(i *Instance, folder string) error

func WriteToZip added in v0.32.0

func WriteToZip(i *Instance, zw *zip.Writer) error

Types

type Config added in v0.32.0

type Config struct {
	Name            string
	Version         string
	Description     string
	Authors         []schema.Author
	TypeFactory     *refutil.TypeFactory
	VariableFactory func(string) (variable.Variable, error)
}

type CustomGraphSerialization

type CustomGraphSerialization interface {
	ToJSON(encoder *jbtf.Encoder) ([]byte, error)
	FromJSON(decoder jbtf.Decoder, body []byte) error
}

type Details added in v0.32.0

type Details struct {
	Name        string
	Version     string
	Description string
	Authors     []schema.Author
}

type Instance

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

func New

func New(config Config) *Instance

func (*Instance) AddProducer

func (a *Instance) AddProducer(producerName string, producer nodes.Output[manifest.Manifest])

func (*Instance) ApplyAppSchema

func (a *Instance) ApplyAppSchema(jsonPayload []byte) error

func (*Instance) ApplyProfile added in v0.32.0

func (a *Instance) ApplyProfile(profile variable.Profile) error

func (*Instance) BuildSchemaForAllNodeTypes added in v0.32.0

func (i *Instance) BuildSchemaForAllNodeTypes() []schema.NodeType

func (*Instance) ConnectNodes

func (a *Instance) ConnectNodes(nodeOutId, outPortName, nodeInId, inPortName string)

func (*Instance) CreateNode

func (a *Instance) CreateNode(nodeType string) (nodes.Node, string, error)

func (*Instance) DeleteMetadata

func (a *Instance) DeleteMetadata(key string)

func (*Instance) DeleteNode

func (a *Instance) DeleteNode(nodeToDelete nodes.Node)

func (*Instance) DeleteNodeById added in v0.28.0

func (a *Instance) DeleteNodeById(nodeId string)

func (*Instance) DeleteNodeInputConnection

func (a *Instance) DeleteNodeInputConnection(nodeId, portName string)

func (*Instance) DeleteProfile added in v0.31.0

func (a *Instance) DeleteProfile(profileName string) error

func (*Instance) DeleteVariable added in v0.28.0

func (a *Instance) DeleteVariable(variablePath string)

func (*Instance) EncodeToAppSchema

func (a *Instance) EncodeToAppSchema() ([]byte, error)

func (*Instance) ExecutionReport added in v0.32.0

func (a *Instance) ExecutionReport() schema.GraphExecutionReport

func (*Instance) GetAuthors added in v0.32.0

func (a *Instance) GetAuthors() []schema.Author

func (*Instance) GetDescription added in v0.32.0

func (a *Instance) GetDescription() string

func (*Instance) GetName added in v0.32.0

func (a *Instance) GetName() string

func (*Instance) GetVariable added in v0.28.0

func (a *Instance) GetVariable(variablePath string) variable.Variable

func (*Instance) GetVersion added in v0.32.0

func (a *Instance) GetVersion() string

func (*Instance) HasNodeWithId added in v0.27.0

func (a *Instance) HasNodeWithId(nodeId string) bool

func (*Instance) IsPortNamed added in v0.25.0

func (a *Instance) IsPortNamed(node nodes.Node, portName string) (string, bool)

func (*Instance) LoadProfile added in v0.31.0

func (a *Instance) LoadProfile(profileName string) error

func (*Instance) Manifest added in v0.25.0

func (a *Instance) Manifest(producerName string) manifest.Manifest

func (*Instance) ModelVersion

func (a *Instance) ModelVersion() uint32

func (*Instance) NewVariable added in v0.28.0

func (a *Instance) NewVariable(variablePath string, variable variable.Variable) string

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> VARIABLES >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

func (*Instance) Node

func (a *Instance) Node(nodeId string) nodes.Node

func (*Instance) NodeId

func (a *Instance) NodeId(node nodes.Node) string

func (*Instance) NodeIds added in v0.25.0

func (a *Instance) NodeIds() []string

func (*Instance) NodeInstanceSchema

func (a *Instance) NodeInstanceSchema(node nodes.Node) schema.NodeInstance

func (*Instance) Parameter

func (a *Instance) Parameter(nodeId string) Parameter

func (*Instance) ParameterData

func (a *Instance) ParameterData(nodeId string) []byte

func (*Instance) Producer

func (a *Instance) Producer(producerName string) nodes.Output[manifest.Manifest]

func (*Instance) ProducerNames

func (a *Instance) ProducerNames() []string

func (*Instance) Profiles added in v0.31.0

func (a *Instance) Profiles() []string

func (*Instance) RenameProfile added in v0.31.0

func (a *Instance) RenameProfile(profile, newName string) error

func (*Instance) Reset added in v0.22.2

func (a *Instance) Reset()

func (*Instance) SaveProfile added in v0.31.0

func (a *Instance) SaveProfile(profileName string)

func (*Instance) Schema

func (a *Instance) Schema() schema.GraphInstance

func (*Instance) SetDescription added in v0.32.0

func (a *Instance) SetDescription(description string)

func (*Instance) SetDetails added in v0.32.0

func (a *Instance) SetDetails(details Details)

func (*Instance) SetMetadata

func (a *Instance) SetMetadata(key string, value any)

func (*Instance) SetName added in v0.32.0

func (a *Instance) SetName(name string)

func (*Instance) SetNodeAsProducer

func (a *Instance) SetNodeAsProducer(nodeId, nodePort, producerName string)

func (*Instance) SetVariableDescription added in v0.28.0

func (a *Instance) SetVariableDescription(variablePath, description string) error

func (*Instance) SetVariableInfo added in v0.28.0

func (a *Instance) SetVariableInfo(variablePath, newPath, description string) error

func (*Instance) SetVersion added in v0.32.0

func (a *Instance) SetVersion(version string)

func (*Instance) SwaggerDefinition added in v0.32.0

func (a *Instance) SwaggerDefinition() swagger.Definition

func (*Instance) UpdateParameter

func (a *Instance) UpdateParameter(nodeId string, data []byte) (bool, error)

func (*Instance) UpdateVariable added in v0.28.0

func (a *Instance) UpdateVariable(variablePath string, data []byte) (bool, error)

func (*Instance) VariableData added in v0.28.0

func (a *Instance) VariableData(variablePath string) ([]byte, error)

type Parameter

type Parameter interface {
	DisplayName() string
	Schema() schema.Parameter

	SetName(name string)
	SetDescription(name string)

	ApplyMessage(msg []byte) (bool, error)
	ToMessage() []byte
}

Jump to

Keyboard shortcuts

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