forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ephemeral.go
214 lines (179 loc) · 6.14 KB
/
ephemeral.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
// Auto-generated by avdl-compiler v1.3.25 (https://github.com/keybase/node-avdl-compiler)
// Input file: avdl/keybase1/ephemeral.avdl
package keybase1
import (
"github.com/keybase/go-framed-msgpack-rpc/rpc"
)
type EkGeneration int64
func (o EkGeneration) DeepCopy() EkGeneration {
return o
}
type DeviceEkMetadata struct {
Kid KID `codec:"kid" json:"device_ephemeral_dh_public"`
HashMeta HashMeta `codec:"hashMeta" json:"hash_meta"`
Generation EkGeneration `codec:"generation" json:"generation"`
Ctime Time `codec:"ctime" json:"ctime"`
DeviceCtime Time `codec:"deviceCtime" json:"deviceCtime"`
}
func (o DeviceEkMetadata) DeepCopy() DeviceEkMetadata {
return DeviceEkMetadata{
Kid: o.Kid.DeepCopy(),
HashMeta: o.HashMeta.DeepCopy(),
Generation: o.Generation.DeepCopy(),
Ctime: o.Ctime.DeepCopy(),
DeviceCtime: o.DeviceCtime.DeepCopy(),
}
}
type DeviceEkStatement struct {
CurrentDeviceEkMetadata DeviceEkMetadata `codec:"currentDeviceEkMetadata" json:"current_device_ek_metadata"`
}
func (o DeviceEkStatement) DeepCopy() DeviceEkStatement {
return DeviceEkStatement{
CurrentDeviceEkMetadata: o.CurrentDeviceEkMetadata.DeepCopy(),
}
}
type DeviceEk struct {
Seed Bytes32 `codec:"seed" json:"seed"`
Metadata DeviceEkMetadata `codec:"metadata" json:"metadata"`
}
func (o DeviceEk) DeepCopy() DeviceEk {
return DeviceEk{
Seed: o.Seed.DeepCopy(),
Metadata: o.Metadata.DeepCopy(),
}
}
type UserEkStatement struct {
CurrentUserEkMetadata UserEkMetadata `codec:"currentUserEkMetadata" json:"current_user_ek_metadata"`
}
func (o UserEkStatement) DeepCopy() UserEkStatement {
return UserEkStatement{
CurrentUserEkMetadata: o.CurrentUserEkMetadata.DeepCopy(),
}
}
type UserEkMetadata struct {
Kid KID `codec:"kid" json:"user_ephemeral_dh_public"`
HashMeta HashMeta `codec:"hashMeta" json:"hash_meta"`
Generation EkGeneration `codec:"generation" json:"generation"`
Ctime Time `codec:"ctime" json:"ctime"`
}
func (o UserEkMetadata) DeepCopy() UserEkMetadata {
return UserEkMetadata{
Kid: o.Kid.DeepCopy(),
HashMeta: o.HashMeta.DeepCopy(),
Generation: o.Generation.DeepCopy(),
Ctime: o.Ctime.DeepCopy(),
}
}
type UserEkBoxed struct {
Box string `codec:"box" json:"box"`
DeviceEkGeneration EkGeneration `codec:"deviceEkGeneration" json:"device_ek_generation"`
Metadata UserEkMetadata `codec:"metadata" json:"metadata"`
}
func (o UserEkBoxed) DeepCopy() UserEkBoxed {
return UserEkBoxed{
Box: o.Box,
DeviceEkGeneration: o.DeviceEkGeneration.DeepCopy(),
Metadata: o.Metadata.DeepCopy(),
}
}
type UserEkBoxMetadata struct {
Box string `codec:"box" json:"box"`
RecipientGeneration EkGeneration `codec:"recipientGeneration" json:"recipient_generation"`
RecipientDeviceID DeviceID `codec:"recipientDeviceID" json:"recipient_device_id"`
}
func (o UserEkBoxMetadata) DeepCopy() UserEkBoxMetadata {
return UserEkBoxMetadata{
Box: o.Box,
RecipientGeneration: o.RecipientGeneration.DeepCopy(),
RecipientDeviceID: o.RecipientDeviceID.DeepCopy(),
}
}
type UserEk struct {
Seed Bytes32 `codec:"seed" json:"seed"`
Metadata UserEkMetadata `codec:"metadata" json:"metadata"`
}
func (o UserEk) DeepCopy() UserEk {
return UserEk{
Seed: o.Seed.DeepCopy(),
Metadata: o.Metadata.DeepCopy(),
}
}
type UserEkReboxArg struct {
UserEkBoxMetadata UserEkBoxMetadata `codec:"userEkBoxMetadata" json:"userEkBoxMetadata"`
DeviceID DeviceID `codec:"deviceID" json:"deviceID"`
DeviceEkStatementSig string `codec:"deviceEkStatementSig" json:"deviceEkStatementSig"`
}
func (o UserEkReboxArg) DeepCopy() UserEkReboxArg {
return UserEkReboxArg{
UserEkBoxMetadata: o.UserEkBoxMetadata.DeepCopy(),
DeviceID: o.DeviceID.DeepCopy(),
DeviceEkStatementSig: o.DeviceEkStatementSig,
}
}
type TeamEkMetadata struct {
Kid KID `codec:"kid" json:"team_ephemeral_dh_public"`
HashMeta HashMeta `codec:"hashMeta" json:"hash_meta"`
Generation EkGeneration `codec:"generation" json:"generation"`
Ctime Time `codec:"ctime" json:"ctime"`
}
func (o TeamEkMetadata) DeepCopy() TeamEkMetadata {
return TeamEkMetadata{
Kid: o.Kid.DeepCopy(),
HashMeta: o.HashMeta.DeepCopy(),
Generation: o.Generation.DeepCopy(),
Ctime: o.Ctime.DeepCopy(),
}
}
type TeamEkStatement struct {
CurrentTeamEkMetadata TeamEkMetadata `codec:"currentTeamEkMetadata" json:"current_team_ek_metadata"`
}
func (o TeamEkStatement) DeepCopy() TeamEkStatement {
return TeamEkStatement{
CurrentTeamEkMetadata: o.CurrentTeamEkMetadata.DeepCopy(),
}
}
type TeamEkBoxed struct {
Box string `codec:"box" json:"box"`
UserEkGeneration EkGeneration `codec:"userEkGeneration" json:"user_ek_generation"`
Metadata TeamEkMetadata `codec:"metadata" json:"metadata"`
}
func (o TeamEkBoxed) DeepCopy() TeamEkBoxed {
return TeamEkBoxed{
Box: o.Box,
UserEkGeneration: o.UserEkGeneration.DeepCopy(),
Metadata: o.Metadata.DeepCopy(),
}
}
type TeamEkBoxMetadata struct {
Box string `codec:"box" json:"box"`
RecipientGeneration EkGeneration `codec:"recipientGeneration" json:"recipient_generation"`
RecipientUID UID `codec:"recipientUID" json:"recipient_uid"`
}
func (o TeamEkBoxMetadata) DeepCopy() TeamEkBoxMetadata {
return TeamEkBoxMetadata{
Box: o.Box,
RecipientGeneration: o.RecipientGeneration.DeepCopy(),
RecipientUID: o.RecipientUID.DeepCopy(),
}
}
type TeamEk struct {
Seed Bytes32 `codec:"seed" json:"seed"`
Metadata TeamEkMetadata `codec:"metadata" json:"metadata"`
}
func (o TeamEk) DeepCopy() TeamEk {
return TeamEk{
Seed: o.Seed.DeepCopy(),
Metadata: o.Metadata.DeepCopy(),
}
}
type EphemeralInterface interface {
}
func EphemeralProtocol(i EphemeralInterface) rpc.Protocol {
return rpc.Protocol{
Name: "keybase.1.ephemeral",
Methods: map[string]rpc.ServeHandlerDescription{},
}
}
type EphemeralClient struct {
Cli rpc.GenericClient
}