forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.go
234 lines (205 loc) · 6.18 KB
/
install.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Auto-generated by avdl-compiler v1.3.19 (https://github.com/keybase/node-avdl-compiler)
// Input file: avdl/keybase1/install.avdl
package keybase1
import (
"github.com/keybase/go-framed-msgpack-rpc/rpc"
)
// Install status describes state of install for a component or service.
type InstallStatus int
const (
InstallStatus_UNKNOWN InstallStatus = 0
InstallStatus_ERROR InstallStatus = 1
InstallStatus_NOT_INSTALLED InstallStatus = 2
InstallStatus_INSTALLED InstallStatus = 4
)
func (o InstallStatus) DeepCopy() InstallStatus { return o }
var InstallStatusMap = map[string]InstallStatus{
"UNKNOWN": 0,
"ERROR": 1,
"NOT_INSTALLED": 2,
"INSTALLED": 4,
}
var InstallStatusRevMap = map[InstallStatus]string{
0: "UNKNOWN",
1: "ERROR",
2: "NOT_INSTALLED",
4: "INSTALLED",
}
type InstallAction int
const (
InstallAction_UNKNOWN InstallAction = 0
InstallAction_NONE InstallAction = 1
InstallAction_UPGRADE InstallAction = 2
InstallAction_REINSTALL InstallAction = 3
InstallAction_INSTALL InstallAction = 4
)
func (o InstallAction) DeepCopy() InstallAction { return o }
var InstallActionMap = map[string]InstallAction{
"UNKNOWN": 0,
"NONE": 1,
"UPGRADE": 2,
"REINSTALL": 3,
"INSTALL": 4,
}
var InstallActionRevMap = map[InstallAction]string{
0: "UNKNOWN",
1: "NONE",
2: "UPGRADE",
3: "REINSTALL",
4: "INSTALL",
}
type ServiceStatus struct {
Version string `codec:"version" json:"version"`
Label string `codec:"label" json:"label"`
Pid string `codec:"pid" json:"pid"`
LastExitStatus string `codec:"lastExitStatus" json:"lastExitStatus"`
BundleVersion string `codec:"bundleVersion" json:"bundleVersion"`
InstallStatus InstallStatus `codec:"installStatus" json:"installStatus"`
InstallAction InstallAction `codec:"installAction" json:"installAction"`
Status Status `codec:"status" json:"status"`
}
func (o ServiceStatus) DeepCopy() ServiceStatus {
return ServiceStatus{
Version: o.Version,
Label: o.Label,
Pid: o.Pid,
LastExitStatus: o.LastExitStatus,
BundleVersion: o.BundleVersion,
InstallStatus: o.InstallStatus.DeepCopy(),
InstallAction: o.InstallAction.DeepCopy(),
Status: o.Status.DeepCopy(),
}
}
type ServicesStatus struct {
Service []ServiceStatus `codec:"service" json:"service"`
Kbfs []ServiceStatus `codec:"kbfs" json:"kbfs"`
Updater []ServiceStatus `codec:"updater" json:"updater"`
}
func (o ServicesStatus) DeepCopy() ServicesStatus {
return ServicesStatus{
Service: (func(x []ServiceStatus) []ServiceStatus {
var ret []ServiceStatus
for _, v := range x {
vCopy := v.DeepCopy()
ret = append(ret, vCopy)
}
return ret
})(o.Service),
Kbfs: (func(x []ServiceStatus) []ServiceStatus {
var ret []ServiceStatus
for _, v := range x {
vCopy := v.DeepCopy()
ret = append(ret, vCopy)
}
return ret
})(o.Kbfs),
Updater: (func(x []ServiceStatus) []ServiceStatus {
var ret []ServiceStatus
for _, v := range x {
vCopy := v.DeepCopy()
ret = append(ret, vCopy)
}
return ret
})(o.Updater),
}
}
type FuseMountInfo struct {
Path string `codec:"path" json:"path"`
Fstype string `codec:"fstype" json:"fstype"`
Output string `codec:"output" json:"output"`
}
func (o FuseMountInfo) DeepCopy() FuseMountInfo {
return FuseMountInfo{
Path: o.Path,
Fstype: o.Fstype,
Output: o.Output,
}
}
type FuseStatus struct {
Version string `codec:"version" json:"version"`
BundleVersion string `codec:"bundleVersion" json:"bundleVersion"`
KextID string `codec:"kextID" json:"kextID"`
Path string `codec:"path" json:"path"`
KextStarted bool `codec:"kextStarted" json:"kextStarted"`
InstallStatus InstallStatus `codec:"installStatus" json:"installStatus"`
InstallAction InstallAction `codec:"installAction" json:"installAction"`
MountInfos []FuseMountInfo `codec:"mountInfos" json:"mountInfos"`
Status Status `codec:"status" json:"status"`
}
func (o FuseStatus) DeepCopy() FuseStatus {
return FuseStatus{
Version: o.Version,
BundleVersion: o.BundleVersion,
KextID: o.KextID,
Path: o.Path,
KextStarted: o.KextStarted,
InstallStatus: o.InstallStatus.DeepCopy(),
InstallAction: o.InstallAction.DeepCopy(),
MountInfos: (func(x []FuseMountInfo) []FuseMountInfo {
var ret []FuseMountInfo
for _, v := range x {
vCopy := v.DeepCopy()
ret = append(ret, vCopy)
}
return ret
})(o.MountInfos),
Status: o.Status.DeepCopy(),
}
}
type ComponentResult struct {
Name string `codec:"name" json:"name"`
Status Status `codec:"status" json:"status"`
}
func (o ComponentResult) DeepCopy() ComponentResult {
return ComponentResult{
Name: o.Name,
Status: o.Status.DeepCopy(),
}
}
type InstallResult struct {
ComponentResults []ComponentResult `codec:"componentResults" json:"componentResults"`
Status Status `codec:"status" json:"status"`
Fatal bool `codec:"fatal" json:"fatal"`
}
func (o InstallResult) DeepCopy() InstallResult {
return InstallResult{
ComponentResults: (func(x []ComponentResult) []ComponentResult {
var ret []ComponentResult
for _, v := range x {
vCopy := v.DeepCopy()
ret = append(ret, vCopy)
}
return ret
})(o.ComponentResults),
Status: o.Status.DeepCopy(),
Fatal: o.Fatal,
}
}
type UninstallResult struct {
ComponentResults []ComponentResult `codec:"componentResults" json:"componentResults"`
Status Status `codec:"status" json:"status"`
}
func (o UninstallResult) DeepCopy() UninstallResult {
return UninstallResult{
ComponentResults: (func(x []ComponentResult) []ComponentResult {
var ret []ComponentResult
for _, v := range x {
vCopy := v.DeepCopy()
ret = append(ret, vCopy)
}
return ret
})(o.ComponentResults),
Status: o.Status.DeepCopy(),
}
}
type InstallInterface interface {
}
func InstallProtocol(i InstallInterface) rpc.Protocol {
return rpc.Protocol{
Name: "keybase.1.install",
Methods: map[string]rpc.ServeHandlerDescription{},
}
}
type InstallClient struct {
Cli rpc.GenericClient
}