-
Notifications
You must be signed in to change notification settings - Fork 10
/
access_drpc.pb.go
199 lines (161 loc) · 7.25 KB
/
access_drpc.pb.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
// Code generated by protoc-gen-go-drpc. DO NOT EDIT.
// protoc-gen-go-drpc version: v0.0.32
// source: github.com/aperturerobotics/bifrost/rpc/access/access.proto
package bifrost_rpc_access
import (
context "context"
errors "errors"
rpcstream "github.com/aperturerobotics/starpc/rpcstream"
drpc1 "github.com/planetscale/vtprotobuf/codec/drpc"
drpc "storj.io/drpc"
drpcerr "storj.io/drpc/drpcerr"
)
type drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto struct{}
func (drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto) Marshal(msg drpc.Message) ([]byte, error) {
return drpc1.Marshal(msg)
}
func (drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto) Unmarshal(buf []byte, msg drpc.Message) error {
return drpc1.Unmarshal(buf, msg)
}
type DRPCAccessRpcServiceClient interface {
DRPCConn() drpc.Conn
LookupRpcService(ctx context.Context, in *LookupRpcServiceRequest) (DRPCAccessRpcService_LookupRpcServiceClient, error)
CallRpcService(ctx context.Context) (DRPCAccessRpcService_CallRpcServiceClient, error)
}
type drpcAccessRpcServiceClient struct {
cc drpc.Conn
}
func NewDRPCAccessRpcServiceClient(cc drpc.Conn) DRPCAccessRpcServiceClient {
return &drpcAccessRpcServiceClient{cc}
}
func (c *drpcAccessRpcServiceClient) DRPCConn() drpc.Conn { return c.cc }
func (c *drpcAccessRpcServiceClient) LookupRpcService(ctx context.Context, in *LookupRpcServiceRequest) (DRPCAccessRpcService_LookupRpcServiceClient, error) {
stream, err := c.cc.NewStream(ctx, "/bifrost.rpc.access.AccessRpcService/LookupRpcService", drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
if err != nil {
return nil, err
}
x := &drpcAccessRpcService_LookupRpcServiceClient{stream}
if err := x.MsgSend(in, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{}); err != nil {
return nil, err
}
if err := x.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type DRPCAccessRpcService_LookupRpcServiceClient interface {
drpc.Stream
Recv() (*LookupRpcServiceResponse, error)
}
type drpcAccessRpcService_LookupRpcServiceClient struct {
drpc.Stream
}
func (x *drpcAccessRpcService_LookupRpcServiceClient) Recv() (*LookupRpcServiceResponse, error) {
m := new(LookupRpcServiceResponse)
if err := x.MsgRecv(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{}); err != nil {
return nil, err
}
return m, nil
}
func (x *drpcAccessRpcService_LookupRpcServiceClient) RecvMsg(m *LookupRpcServiceResponse) error {
return x.MsgRecv(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
}
func (c *drpcAccessRpcServiceClient) CallRpcService(ctx context.Context) (DRPCAccessRpcService_CallRpcServiceClient, error) {
stream, err := c.cc.NewStream(ctx, "/bifrost.rpc.access.AccessRpcService/CallRpcService", drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
if err != nil {
return nil, err
}
x := &drpcAccessRpcService_CallRpcServiceClient{stream}
return x, nil
}
type DRPCAccessRpcService_CallRpcServiceClient interface {
drpc.Stream
Send(*rpcstream.RpcStreamPacket) error
Recv() (*rpcstream.RpcStreamPacket, error)
}
type drpcAccessRpcService_CallRpcServiceClient struct {
drpc.Stream
}
func (x *drpcAccessRpcService_CallRpcServiceClient) Send(m *rpcstream.RpcStreamPacket) error {
return x.MsgSend(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
}
func (x *drpcAccessRpcService_CallRpcServiceClient) Recv() (*rpcstream.RpcStreamPacket, error) {
m := new(rpcstream.RpcStreamPacket)
if err := x.MsgRecv(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{}); err != nil {
return nil, err
}
return m, nil
}
func (x *drpcAccessRpcService_CallRpcServiceClient) RecvMsg(m *rpcstream.RpcStreamPacket) error {
return x.MsgRecv(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
}
type DRPCAccessRpcServiceServer interface {
LookupRpcService(*LookupRpcServiceRequest, DRPCAccessRpcService_LookupRpcServiceStream) error
CallRpcService(DRPCAccessRpcService_CallRpcServiceStream) error
}
type DRPCAccessRpcServiceUnimplementedServer struct{}
func (s *DRPCAccessRpcServiceUnimplementedServer) LookupRpcService(*LookupRpcServiceRequest, DRPCAccessRpcService_LookupRpcServiceStream) error {
return drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
}
func (s *DRPCAccessRpcServiceUnimplementedServer) CallRpcService(DRPCAccessRpcService_CallRpcServiceStream) error {
return drpcerr.WithCode(errors.New("Unimplemented"), drpcerr.Unimplemented)
}
type DRPCAccessRpcServiceDescription struct{}
func (DRPCAccessRpcServiceDescription) NumMethods() int { return 2 }
func (DRPCAccessRpcServiceDescription) Method(n int) (string, drpc.Encoding, drpc.Receiver, interface{}, bool) {
switch n {
case 0:
return "/bifrost.rpc.access.AccessRpcService/LookupRpcService", drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return nil, srv.(DRPCAccessRpcServiceServer).
LookupRpcService(
in1.(*LookupRpcServiceRequest),
&drpcAccessRpcService_LookupRpcServiceStream{in2.(drpc.Stream)},
)
}, DRPCAccessRpcServiceServer.LookupRpcService, true
case 1:
return "/bifrost.rpc.access.AccessRpcService/CallRpcService", drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{},
func(srv interface{}, ctx context.Context, in1, in2 interface{}) (drpc.Message, error) {
return nil, srv.(DRPCAccessRpcServiceServer).
CallRpcService(
&drpcAccessRpcService_CallRpcServiceStream{in1.(drpc.Stream)},
)
}, DRPCAccessRpcServiceServer.CallRpcService, true
default:
return "", nil, nil, nil, false
}
}
func DRPCRegisterAccessRpcService(mux drpc.Mux, impl DRPCAccessRpcServiceServer) error {
return mux.Register(impl, DRPCAccessRpcServiceDescription{})
}
type DRPCAccessRpcService_LookupRpcServiceStream interface {
drpc.Stream
Send(*LookupRpcServiceResponse) error
}
type drpcAccessRpcService_LookupRpcServiceStream struct {
drpc.Stream
}
func (x *drpcAccessRpcService_LookupRpcServiceStream) Send(m *LookupRpcServiceResponse) error {
return x.MsgSend(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
}
type DRPCAccessRpcService_CallRpcServiceStream interface {
drpc.Stream
Send(*rpcstream.RpcStreamPacket) error
Recv() (*rpcstream.RpcStreamPacket, error)
}
type drpcAccessRpcService_CallRpcServiceStream struct {
drpc.Stream
}
func (x *drpcAccessRpcService_CallRpcServiceStream) Send(m *rpcstream.RpcStreamPacket) error {
return x.MsgSend(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
}
func (x *drpcAccessRpcService_CallRpcServiceStream) Recv() (*rpcstream.RpcStreamPacket, error) {
m := new(rpcstream.RpcStreamPacket)
if err := x.MsgRecv(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{}); err != nil {
return nil, err
}
return m, nil
}
func (x *drpcAccessRpcService_CallRpcServiceStream) RecvMsg(m *rpcstream.RpcStreamPacket) error {
return x.MsgRecv(m, drpcEncoding_File_github_com_aperturerobotics_bifrost_rpc_access_access_proto{})
}