-
Notifications
You must be signed in to change notification settings - Fork 776
/
Copy pathmodules.go
72 lines (57 loc) · 1.55 KB
/
modules.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
package dto
type Module struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
Template Template `json:"template"`
Version string `json:"version"`
Values interface{} `json:"values"`
Status string `json:"status"`
IconURL string `json:"iconURL"`
}
type Template struct {
URL string `json:"repo" binding:"required"`
Path string `json:"path" binding:"required"`
Version string `json:"version"`
ResolvedVersion string `json:"resolvedVersion"`
}
type TemplatesResponse struct {
Current string `json:"current"`
New string `json:"new"`
}
type DeleteResource struct {
Group string `json:"group"`
Version string `json:"version"`
Kind string `json:"kind"`
Name string `json:"name"`
Namespace string `json:"namespace"`
}
func (d *DeleteResource) GetGroupVersionKind() string {
return d.Group + "/" + d.Version + ", Kind=" + d.Kind
}
func (d *DeleteResource) GetGroup() string {
return d.Group
}
func (d *DeleteResource) GetVersion() string {
return d.Version
}
func (d *DeleteResource) GetKind() string {
return d.Kind
}
func (d *DeleteResource) GetName() string {
return d.Name
}
func (d *DeleteResource) GetNamespace() string {
return d.Namespace
}
func (d *DeleteResource) GetDeleted() bool {
return false
}
func (d *DeleteResource) SetDeleted(_ bool) {}
func (d *DeleteResource) IsMissing() bool {
return false
}
func (d *DeleteResource) SetMissing(_ bool) {}
type KeyValue struct {
Key string `json:"key"`
Value string `json:"value"`
}