generator

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2025 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildNodeTypeSchema added in v0.11.0

func BuildNodeTypeSchema(node nodes.Node) schema.NodeType

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.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) GetParameter added in v0.20.0

func (a *App) GetParameter(nodeId string) Parameter

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() schema.App

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 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) AutosaveGraph added in v0.20.0

func (as *AppServer) AutosaveGraph()

func (*AppServer) MermaidEndpoint added in v0.10.0

func (as *AppServer) MermaidEndpoint(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) 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 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 CustomGraphSerialization added in v0.11.0

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

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]schema.Producer   `json:"producers"`
	Nodes       map[string]GraphNodeInstance `json:"nodes"`
	Metadata    map[string]any               `json:"metadata,omitempty"`
}

type GraphNodeInstance added in v0.11.0

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

type NestedSyncMap added in v0.20.0

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

func NewNestedSyncMap added in v0.20.0

func NewNestedSyncMap() *NestedSyncMap

func (*NestedSyncMap) Get added in v0.20.0

func (sm *NestedSyncMap) Get(key string) any

func (*NestedSyncMap) OverwriteData added in v0.20.0

func (sm *NestedSyncMap) OverwriteData(data map[string]any)

func (*NestedSyncMap) Set added in v0.20.0

func (sm *NestedSyncMap) Set(key string, value any)

type NodeBuilder added in v0.11.0

type NodeBuilder func() nodes.Node

type Parameter

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

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

type SwaggerParameter added in v0.13.0

type SwaggerParameter interface {
	Parameter

	SwaggerProperty() swagger.Property
}

type SyncMap added in v0.20.0

type SyncMap[Key comparable, Value any] struct {
	// contains filtered or unexported fields
}

func NewSyncMap added in v0.20.0

func NewSyncMap[Key comparable, Value any]() *SyncMap[Key, Value]

func (*SyncMap[Key, Value]) Get added in v0.20.0

func (sm *SyncMap[Key, Value]) Get(key Key) Value

func (*SyncMap[Key, Value]) Set added in v0.20.0

func (sm *SyncMap[Key, Value]) Set(key Key, value Value)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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