-
Notifications
You must be signed in to change notification settings - Fork 652
/
Copy pathprocess.go
49 lines (39 loc) · 969 Bytes
/
process.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
48
49
package widgets
import (
"github.com/yaoapp/gou/process"
)
// WidgetHandlers Processes
var WidgetHandlers = map[string]process.Handler{
"apis": processApis,
"actions": processActions,
"models": processModels,
"fields": processFields,
"filters": processFilters,
}
func init() {
process.RegisterGroup("widget", WidgetHandlers)
}
// Get the loaded APIs
func processApis(process *process.Process) interface{} {
return Apis()
}
// Get the actions of each widget
func processActions(process *process.Process) interface{} {
return Actions()
}
// Get the loaded Models
func processModels(process *process.Process) interface{} {
return Models()
}
// Get the loaded Fields
func processFields(process *process.Process) interface{} {
return Fields()
}
// Get the loaded Filters
func processFilters(process *process.Process) interface{} {
return Filters()
}
// Get the loaded flows
func processFlows() {}
// Get the loaded Models
func processScripts() {}