-
Notifications
You must be signed in to change notification settings - Fork 38
/
ctl.go
129 lines (105 loc) · 2.59 KB
/
ctl.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
// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/ctl.avdl
package keybase1
import (
"fmt"
)
type ExitCode int
const (
ExitCode_OK ExitCode = 0
ExitCode_NOTOK ExitCode = 2
ExitCode_RESTART ExitCode = 4
)
func (o ExitCode) DeepCopy() ExitCode { return o }
var ExitCodeMap = map[string]ExitCode{
"OK": 0,
"NOTOK": 2,
"RESTART": 4,
}
var ExitCodeRevMap = map[ExitCode]string{
0: "OK",
2: "NOTOK",
4: "RESTART",
}
func (e ExitCode) String() string {
if v, ok := ExitCodeRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type DbType int
const (
DbType_MAIN DbType = 0
DbType_CHAT DbType = 1
DbType_FS_BLOCK_CACHE DbType = 2
DbType_FS_BLOCK_CACHE_META DbType = 3
DbType_FS_SYNC_BLOCK_CACHE DbType = 4
DbType_FS_SYNC_BLOCK_CACHE_META DbType = 5
)
func (o DbType) DeepCopy() DbType { return o }
var DbTypeMap = map[string]DbType{
"MAIN": 0,
"CHAT": 1,
"FS_BLOCK_CACHE": 2,
"FS_BLOCK_CACHE_META": 3,
"FS_SYNC_BLOCK_CACHE": 4,
"FS_SYNC_BLOCK_CACHE_META": 5,
}
var DbTypeRevMap = map[DbType]string{
0: "MAIN",
1: "CHAT",
2: "FS_BLOCK_CACHE",
3: "FS_BLOCK_CACHE_META",
4: "FS_SYNC_BLOCK_CACHE",
5: "FS_SYNC_BLOCK_CACHE_META",
}
func (e DbType) String() string {
if v, ok := DbTypeRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}
type DbKey struct {
DbType DbType `codec:"dbType" json:"dbType"`
ObjType int `codec:"objType" json:"objType"`
Key string `codec:"key" json:"key"`
}
func (o DbKey) DeepCopy() DbKey {
return DbKey{
DbType: o.DbType.DeepCopy(),
ObjType: o.ObjType,
Key: o.Key,
}
}
type DbValue []byte
func (o DbValue) DeepCopy() DbValue {
return (func(x []byte) []byte {
if x == nil {
return nil
}
return append([]byte{}, x...)
})(o)
}
type OnLoginStartupStatus int
const (
OnLoginStartupStatus_UNKNOWN OnLoginStartupStatus = 0
OnLoginStartupStatus_DISABLED OnLoginStartupStatus = 1
OnLoginStartupStatus_ENABLED OnLoginStartupStatus = 2
)
func (o OnLoginStartupStatus) DeepCopy() OnLoginStartupStatus { return o }
var OnLoginStartupStatusMap = map[string]OnLoginStartupStatus{
"UNKNOWN": 0,
"DISABLED": 1,
"ENABLED": 2,
}
var OnLoginStartupStatusRevMap = map[OnLoginStartupStatus]string{
0: "UNKNOWN",
1: "DISABLED",
2: "ENABLED",
}
func (e OnLoginStartupStatus) String() string {
if v, ok := OnLoginStartupStatusRevMap[e]; ok {
return v
}
return fmt.Sprintf("%v", int(e))
}