-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
app_schema.go
47 lines (39 loc) · 1.34 KB
/
app_schema.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package generator
type NodeOutput struct {
Name string `json:"name"`
Type string `json:"type"`
}
type NodeInput struct {
Type string `json:"type"`
}
type NodeInstanceSchema struct {
Type string `json:"type"`
Name string `json:"name"`
Version int `json:"version"`
Dependencies []NodeDependencySchema `json:"dependencies"`
Parameter ParameterSchema `json:"parameter,omitempty"`
// node nodes.Node
parameter Parameter
}
type NodeDependencySchema struct {
DependencyID string `json:"dependencyID"`
DependencyPort string `json:"dependencyPort"`
Name string `json:"name"`
}
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"`
}
type ProducerSchema struct {
NodeID string `json:"nodeID"`
Port string `json:"port"` // Name of node out port
}
type AppSchema struct {
Producers map[string]ProducerSchema `json:"producers"`
Nodes map[string]NodeInstanceSchema `json:"nodes"`
Types []NodeTypeSchema `json:"types"`
}