-
Notifications
You must be signed in to change notification settings - Fork 43
/
identify.go
145 lines (132 loc) · 4.08 KB
/
identify.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
// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/identify.avdl
package keybase1
type IdentifyProofBreak struct {
RemoteProof RemoteProof `codec:"remoteProof" json:"remoteProof"`
Lcr LinkCheckResult `codec:"lcr" json:"lcr"`
}
func (o IdentifyProofBreak) DeepCopy() IdentifyProofBreak {
return IdentifyProofBreak{
RemoteProof: o.RemoteProof.DeepCopy(),
Lcr: o.Lcr.DeepCopy(),
}
}
type IdentifyTrackBreaks struct {
Keys []IdentifyKey `codec:"keys" json:"keys"`
Proofs []IdentifyProofBreak `codec:"proofs" json:"proofs"`
}
func (o IdentifyTrackBreaks) DeepCopy() IdentifyTrackBreaks {
return IdentifyTrackBreaks{
Keys: (func(x []IdentifyKey) []IdentifyKey {
if x == nil {
return nil
}
ret := make([]IdentifyKey, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Keys),
Proofs: (func(x []IdentifyProofBreak) []IdentifyProofBreak {
if x == nil {
return nil
}
ret := make([]IdentifyProofBreak, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Proofs),
}
}
type Identify2Res struct {
Upk UserPlusKeys `codec:"upk" json:"upk"`
IdentifiedAt Time `codec:"identifiedAt" json:"identifiedAt"`
TrackBreaks *IdentifyTrackBreaks `codec:"trackBreaks,omitempty" json:"trackBreaks,omitempty"`
}
func (o Identify2Res) DeepCopy() Identify2Res {
return Identify2Res{
Upk: o.Upk.DeepCopy(),
IdentifiedAt: o.IdentifiedAt.DeepCopy(),
TrackBreaks: (func(x *IdentifyTrackBreaks) *IdentifyTrackBreaks {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.TrackBreaks),
}
}
type Identify2ResUPK2 struct {
Upk UserPlusKeysV2AllIncarnations `codec:"upk" json:"upk"`
IdentifiedAt Time `codec:"identifiedAt" json:"identifiedAt"`
TrackBreaks *IdentifyTrackBreaks `codec:"trackBreaks,omitempty" json:"trackBreaks,omitempty"`
}
func (o Identify2ResUPK2) DeepCopy() Identify2ResUPK2 {
return Identify2ResUPK2{
Upk: o.Upk.DeepCopy(),
IdentifiedAt: o.IdentifiedAt.DeepCopy(),
TrackBreaks: (func(x *IdentifyTrackBreaks) *IdentifyTrackBreaks {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.TrackBreaks),
}
}
type IdentifyLiteRes struct {
Ul UserOrTeamLite `codec:"ul" json:"ul"`
TrackBreaks *IdentifyTrackBreaks `codec:"trackBreaks,omitempty" json:"trackBreaks,omitempty"`
}
func (o IdentifyLiteRes) DeepCopy() IdentifyLiteRes {
return IdentifyLiteRes{
Ul: o.Ul.DeepCopy(),
TrackBreaks: (func(x *IdentifyTrackBreaks) *IdentifyTrackBreaks {
if x == nil {
return nil
}
tmp := (*x).DeepCopy()
return &tmp
})(o.TrackBreaks),
}
}
type ResolveIdentifyImplicitTeamRes struct {
DisplayName string `codec:"displayName" json:"displayName"`
TeamID TeamID `codec:"teamID" json:"teamID"`
Writers []UserVersion `codec:"writers" json:"writers"`
TrackBreaks map[UserVersion]IdentifyTrackBreaks `codec:"trackBreaks" json:"trackBreaks"`
FolderID TLFID `codec:"folderID" json:"folderID"`
}
func (o ResolveIdentifyImplicitTeamRes) DeepCopy() ResolveIdentifyImplicitTeamRes {
return ResolveIdentifyImplicitTeamRes{
DisplayName: o.DisplayName,
TeamID: o.TeamID.DeepCopy(),
Writers: (func(x []UserVersion) []UserVersion {
if x == nil {
return nil
}
ret := make([]UserVersion, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
}
return ret
})(o.Writers),
TrackBreaks: (func(x map[UserVersion]IdentifyTrackBreaks) map[UserVersion]IdentifyTrackBreaks {
if x == nil {
return nil
}
ret := make(map[UserVersion]IdentifyTrackBreaks, len(x))
for k, v := range x {
kCopy := k.DeepCopy()
vCopy := v.DeepCopy()
ret[kCopy] = vCopy
}
return ret
})(o.TrackBreaks),
FolderID: o.FolderID.DeepCopy(),
}
}