-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.go
58 lines (47 loc) · 1.19 KB
/
model.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
50
51
52
53
54
55
56
57
58
package model
import "github.com/zwoo-hq/zwooc/pkg/tasks"
type (
FragmentOptions map[string]interface{}
HookOptions struct {
Command string `json:"command"`
Fragments []string `json:"fragments"`
Profiles map[string]string `json:"profiles"`
}
BaseOptions struct {
Base string `json:"base"`
IncludeFragments []string `json:"includeFragments"`
}
ProfileOptions struct {
Args map[string]string `json:"args"`
Env []string `json:"env"`
}
ViteOptions struct {
Mode string `json:"mode"`
}
DotNetOptions struct {
Project string `json:"project"`
}
CustomOptions struct {
Command string `json:"command"`
}
CompoundOptions struct {
Profiles map[string]string `json:"profiles"`
IncludeFragments []string `json:"includeFragments"`
}
)
type (
ProfileWrapper interface {
GetName() string
GetMode() string
GetAdapter() string
GetDirectory() string
GetOptions() map[string]interface{}
GetViteOptions() ViteOptions
GetDotNetOptions() DotNetOptions
GetBaseOptions() BaseOptions
GetProfileOptions() ProfileOptions
}
Adapter interface {
CreateTask(c ProfileWrapper, extraArgs []string) tasks.Task
}
)