generator

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Nodes added in v0.11.0

func Nodes() *refutil.TypeFactory

func WriteMermaid added in v0.10.0

func WriteMermaid(a App, out io.Writer) error

Types

type App added in v0.9.0

type App struct {
	Name        string
	Version     string
	Description string
	WebScene    *room.WebScene
	Authors     []Author
	Producers   map[string]nodes.NodeOutput[Artifact]
	// contains filtered or unexported fields
}

func (*App) ApplyGraph added in v0.11.0

func (a *App) ApplyGraph(jsonPayload []byte) error

func (App) Generate added in v0.10.0

func (a App) Generate(outputPath string) error

func (*App) Graph added in v0.11.0

func (a *App) Graph() []byte

func (*App) Run added in v0.9.0

func (a *App) Run() error

func (*App) Schema added in v0.10.0

func (a *App) Schema() AppSchema

func (*App) SetupProducers added in v0.11.0

func (a *App) SetupProducers()

func (App) SwaggerSpec added in v0.13.0

func (a App) SwaggerSpec() swagger.Spec

func (App) WriteSwagger added in v0.13.0

func (a App) WriteSwagger(out io.Writer) error

func (App) WriteZip added in v0.10.0

func (a App) WriteZip(out io.Writer) error

type AppSchema added in v0.10.0

type AppSchema struct {
	Producers map[string]ProducerSchema     `json:"producers"`
	Nodes     map[string]NodeInstanceSchema `json:"nodes"`
	Types     []NodeTypeSchema              `json:"types"`
}

type AppServer added in v0.10.0

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

func (*AppServer) ApplyMessage added in v0.11.0

func (as *AppServer) ApplyMessage(key string, msg []byte) (bool, error)

func (*AppServer) GraphEndpoint added in v0.11.0

func (as *AppServer) GraphEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) MermaidEndpoint added in v0.10.0

func (as *AppServer) MermaidEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) NodeConnectionEndpoint added in v0.11.0

func (as *AppServer) NodeConnectionEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) NodeEndpoint added in v0.11.0

func (as *AppServer) NodeEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) ProducerEndpoint added in v0.10.0

func (as *AppServer) ProducerEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) ProfileEndpoint added in v0.10.0

func (as *AppServer) ProfileEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) SceneEndpoint added in v0.10.0

func (as *AppServer) SceneEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) SchemaEndpoint added in v0.10.0

func (as *AppServer) SchemaEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) Serve added in v0.10.0

func (as *AppServer) Serve() error

func (*AppServer) StartedEndpoint added in v0.10.0

func (as *AppServer) StartedEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) SwaggerEndpoint added in v0.13.0

func (as *AppServer) SwaggerEndpoint(w http.ResponseWriter, r *http.Request)

func (*AppServer) ZipEndpoint added in v0.10.0

func (as *AppServer) ZipEndpoint(w http.ResponseWriter, r *http.Request)

type Artifact added in v0.9.0

type Artifact interface {
	Write(io.Writer) error
	Mime() string
}

type Author added in v0.9.0

type Author struct {
	Name        string
	ContactInfo []AuthorContact
}

type AuthorContact added in v0.9.0

type AuthorContact struct {
	Medium string
	Value  string
}

type CreateNodeConnectionRequest added in v0.11.0

type CreateNodeConnectionRequest struct {
	NodeOutId   string `json:"nodeOutId"`
	OutPortName string `json:"outPortName"`
	NodeInId    string `json:"nodeInId"`
	InPortName  string `json:"inPortName"`
}

type CreateNodeConnectionResponse added in v0.11.0

type CreateNodeConnectionResponse struct {
}

type CreateNodeRequest added in v0.11.0

type CreateNodeRequest struct {
	NodeType string `json:"nodeType"`
}

type CreateNodeResponse added in v0.11.0

type CreateNodeResponse struct {
	NodeID string             `json:"nodeID"`
	Data   NodeInstanceSchema `json:"data"`
}

type CustomGraphSerialization added in v0.11.0

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

type DeleteNodeConnectionRequest added in v0.11.0

type DeleteNodeConnectionRequest struct {
	NodeId     string `json:"nodeId"`
	InPortName string `json:"inPortName"`
}

type DeleteNodeConnectionResponse added in v0.11.0

type DeleteNodeConnectionResponse struct {
}

type DeleteNodeRequest added in v0.11.0

type DeleteNodeRequest struct {
	NodeID string `json:"nodeID"`
}

type Graph added in v0.11.0

type Graph struct {
	Name        string                       `json:"name,omitempty"`
	Version     string                       `json:"version,omitempty"`
	Description string                       `json:"description,omitempty"`
	WebScene    *room.WebScene               `json:"webScene"`
	Producers   map[string]ProducerSchema    `json:"producers"`
	Nodes       map[string]GraphNodeInstance `json:"nodes"`
}

type GraphNodeInstance added in v0.11.0

type GraphNodeInstance struct {
	Type         string                 `json:"type"`
	Dependencies []NodeDependencySchema `json:"dependencies,omitempty"`
	Data         json.RawMessage        `json:"data,omitempty"`
}

type NodeBuilder added in v0.11.0

type NodeBuilder func() nodes.Node

type NodeDependencySchema added in v0.10.0

type NodeDependencySchema struct {
	DependencyID   string `json:"dependencyID"`
	DependencyPort string `json:"dependencyPort"`
	Name           string `json:"name"`
}

type NodeInput added in v0.11.0

type NodeInput struct {
	Type string `json:"type"`
}

type NodeInstanceSchema added in v0.11.0

type NodeInstanceSchema struct {
	Type         string                 `json:"type"`
	Name         string                 `json:"name"`
	Version      int                    `json:"version"`
	Dependencies []NodeDependencySchema `json:"dependencies"`
	Parameter    ParameterSchema        `json:"parameter,omitempty"`
	// contains filtered or unexported fields
}

type NodeOutput added in v0.10.0

type NodeOutput struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type NodeTypeSchema added in v0.11.0

type NodeTypeSchema struct {
	DisplayName string               `json:"displayName"`
	Type        string               `json:"type"`
	Path        string               `json:"path"`
	Outputs     []NodeOutput         `json:"outputs,omitempty"`
	Inputs      map[string]NodeInput `json:"inputs,omitempty"`
	Parameter   ParameterSchema      `json:"parameter,omitempty"`
}

func BuildNodeTypeSchema added in v0.11.0

func BuildNodeTypeSchema(node nodes.Node) NodeTypeSchema

type Parameter

type Parameter interface {
	DisplayName() string
	Schema() ParameterSchema
	InitializeForCLI(set *flag.FlagSet)

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

type ParameterSchema added in v0.9.0

type ParameterSchema interface {
	ValueType() string
	DisplayName() string
}

type ParameterSchemaBase added in v0.9.0

type ParameterSchemaBase struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

func (ParameterSchemaBase) DisplayName added in v0.9.0

func (gps ParameterSchemaBase) DisplayName() string

func (ParameterSchemaBase) ValueType added in v0.9.0

func (gps ParameterSchemaBase) ValueType() string

type PolyformArtifact added in v0.9.0

type PolyformArtifact[T any] interface {
	Artifact
	Value() T
}

type ProducerSchema added in v0.11.0

type ProducerSchema struct {
	NodeID string `json:"nodeID"`
	Port   string `json:"port"` // Name of node out port
}

type SwaggerParameter added in v0.13.0

type SwaggerParameter interface {
	Parameter

	SwaggerProperty() swagger.Property
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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