forked from keybase/client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delegate_ui_ctl.go
177 lines (158 loc) · 5.32 KB
/
delegate_ui_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
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
// Auto-generated by avdl-compiler v1.3.25 (https://github.com/keybase/node-avdl-compiler)
// Input file: avdl/keybase1/delegate_ui_ctl.avdl
package keybase1
import (
"github.com/keybase/go-framed-msgpack-rpc/rpc"
context "golang.org/x/net/context"
)
type RegisterIdentifyUIArg struct {
}
type RegisterSecretUIArg struct {
}
type RegisterUpdateUIArg struct {
}
type RegisterRekeyUIArg struct {
}
type RegisterHomeUIArg struct {
}
type RegisterGregorFirehoseArg struct {
}
type RegisterGregorFirehoseFilteredArg struct {
Systems []string `codec:"systems" json:"systems"`
}
type DelegateUiCtlInterface interface {
RegisterIdentifyUI(context.Context) error
RegisterSecretUI(context.Context) error
RegisterUpdateUI(context.Context) error
RegisterRekeyUI(context.Context) error
RegisterHomeUI(context.Context) error
RegisterGregorFirehose(context.Context) error
// registerGregorFirehoseFilter allows a client to register for a filtered
// firehose, limited to only the OOBMs of the systems provided.
// Like the firehose handler, but less pressure.
RegisterGregorFirehoseFiltered(context.Context, []string) error
}
func DelegateUiCtlProtocol(i DelegateUiCtlInterface) rpc.Protocol {
return rpc.Protocol{
Name: "keybase.1.delegateUiCtl",
Methods: map[string]rpc.ServeHandlerDescription{
"registerIdentifyUI": {
MakeArg: func() interface{} {
var ret [1]RegisterIdentifyUIArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
err = i.RegisterIdentifyUI(ctx)
return
},
MethodType: rpc.MethodCall,
},
"registerSecretUI": {
MakeArg: func() interface{} {
var ret [1]RegisterSecretUIArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
err = i.RegisterSecretUI(ctx)
return
},
MethodType: rpc.MethodCall,
},
"registerUpdateUI": {
MakeArg: func() interface{} {
var ret [1]RegisterUpdateUIArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
err = i.RegisterUpdateUI(ctx)
return
},
MethodType: rpc.MethodCall,
},
"registerRekeyUI": {
MakeArg: func() interface{} {
var ret [1]RegisterRekeyUIArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
err = i.RegisterRekeyUI(ctx)
return
},
MethodType: rpc.MethodCall,
},
"registerHomeUI": {
MakeArg: func() interface{} {
var ret [1]RegisterHomeUIArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
err = i.RegisterHomeUI(ctx)
return
},
MethodType: rpc.MethodCall,
},
"registerGregorFirehose": {
MakeArg: func() interface{} {
var ret [1]RegisterGregorFirehoseArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
err = i.RegisterGregorFirehose(ctx)
return
},
MethodType: rpc.MethodCall,
},
"registerGregorFirehoseFiltered": {
MakeArg: func() interface{} {
var ret [1]RegisterGregorFirehoseFilteredArg
return &ret
},
Handler: func(ctx context.Context, args interface{}) (ret interface{}, err error) {
typedArgs, ok := args.(*[1]RegisterGregorFirehoseFilteredArg)
if !ok {
err = rpc.NewTypeError((*[1]RegisterGregorFirehoseFilteredArg)(nil), args)
return
}
err = i.RegisterGregorFirehoseFiltered(ctx, typedArgs[0].Systems)
return
},
MethodType: rpc.MethodCall,
},
},
}
}
type DelegateUiCtlClient struct {
Cli rpc.GenericClient
}
func (c DelegateUiCtlClient) RegisterIdentifyUI(ctx context.Context) (err error) {
err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerIdentifyUI", []interface{}{RegisterIdentifyUIArg{}}, nil)
return
}
func (c DelegateUiCtlClient) RegisterSecretUI(ctx context.Context) (err error) {
err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerSecretUI", []interface{}{RegisterSecretUIArg{}}, nil)
return
}
func (c DelegateUiCtlClient) RegisterUpdateUI(ctx context.Context) (err error) {
err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerUpdateUI", []interface{}{RegisterUpdateUIArg{}}, nil)
return
}
func (c DelegateUiCtlClient) RegisterRekeyUI(ctx context.Context) (err error) {
err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerRekeyUI", []interface{}{RegisterRekeyUIArg{}}, nil)
return
}
func (c DelegateUiCtlClient) RegisterHomeUI(ctx context.Context) (err error) {
err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerHomeUI", []interface{}{RegisterHomeUIArg{}}, nil)
return
}
func (c DelegateUiCtlClient) RegisterGregorFirehose(ctx context.Context) (err error) {
err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerGregorFirehose", []interface{}{RegisterGregorFirehoseArg{}}, nil)
return
}
// registerGregorFirehoseFilter allows a client to register for a filtered
// firehose, limited to only the OOBMs of the systems provided.
// Like the firehose handler, but less pressure.
func (c DelegateUiCtlClient) RegisterGregorFirehoseFiltered(ctx context.Context, systems []string) (err error) {
__arg := RegisterGregorFirehoseFilteredArg{Systems: systems}
err = c.Cli.Call(ctx, "keybase.1.delegateUiCtl.registerGregorFirehoseFiltered", []interface{}{__arg}, nil)
return
}