-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin_interface.pb.go
308 lines (266 loc) · 10.2 KB
/
plugin_interface.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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: plugin_interface.proto
/*
Package proto is a generated protocol buffer package.
It is generated from these files:
plugin_interface.proto
It has these top-level messages:
ErrorStatus
DeployRequest
Empty
*/
package proto
import proto1 "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package
type ErrorStatus struct {
// Types that are valid to be assigned to OptionalErr:
// *ErrorStatus_Error
OptionalErr isErrorStatus_OptionalErr `protobuf_oneof:"optional_err"`
}
func (m *ErrorStatus) Reset() { *m = ErrorStatus{} }
func (m *ErrorStatus) String() string { return proto1.CompactTextString(m) }
func (*ErrorStatus) ProtoMessage() {}
func (*ErrorStatus) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type isErrorStatus_OptionalErr interface {
isErrorStatus_OptionalErr()
}
type ErrorStatus_Error struct {
Error string `protobuf:"bytes,2,opt,name=error,oneof"`
}
func (*ErrorStatus_Error) isErrorStatus_OptionalErr() {}
func (m *ErrorStatus) GetOptionalErr() isErrorStatus_OptionalErr {
if m != nil {
return m.OptionalErr
}
return nil
}
func (m *ErrorStatus) GetError() string {
if x, ok := m.GetOptionalErr().(*ErrorStatus_Error); ok {
return x.Error
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ErrorStatus) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), func(msg proto1.Message) (n int), []interface{}) {
return _ErrorStatus_OneofMarshaler, _ErrorStatus_OneofUnmarshaler, _ErrorStatus_OneofSizer, []interface{}{
(*ErrorStatus_Error)(nil),
}
}
func _ErrorStatus_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error {
m := msg.(*ErrorStatus)
// optional_err
switch x := m.OptionalErr.(type) {
case *ErrorStatus_Error:
b.EncodeVarint(2<<3 | proto1.WireBytes)
b.EncodeStringBytes(x.Error)
case nil:
default:
return fmt.Errorf("ErrorStatus.OptionalErr has unexpected type %T", x)
}
return nil
}
func _ErrorStatus_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) {
m := msg.(*ErrorStatus)
switch tag {
case 2: // optional_err.error
if wire != proto1.WireBytes {
return true, proto1.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.OptionalErr = &ErrorStatus_Error{x}
return true, err
default:
return false, nil
}
}
func _ErrorStatus_OneofSizer(msg proto1.Message) (n int) {
m := msg.(*ErrorStatus)
// optional_err
switch x := m.OptionalErr.(type) {
case *ErrorStatus_Error:
n += proto1.SizeVarint(2<<3 | proto1.WireBytes)
n += proto1.SizeVarint(uint64(len(x.Error)))
n += len(x.Error)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type DeployRequest struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *DeployRequest) Reset() { *m = DeployRequest{} }
func (m *DeployRequest) String() string { return proto1.CompactTextString(m) }
func (*DeployRequest) ProtoMessage() {}
func (*DeployRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *DeployRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type Empty struct {
}
func (m *Empty) Reset() { *m = Empty{} }
func (m *Empty) String() string { return proto1.CompactTextString(m) }
func (*Empty) ProtoMessage() {}
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func init() {
proto1.RegisterType((*ErrorStatus)(nil), "proto.ErrorStatus")
proto1.RegisterType((*DeployRequest)(nil), "proto.DeployRequest")
proto1.RegisterType((*Empty)(nil), "proto.Empty")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Instance API for PluginInterface service
type PluginInterfaceClient interface {
Initialization(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ErrorStatus, error)
Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*ErrorStatus, error)
UnInitialization(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ErrorStatus, error)
}
type pluginInterfaceClient struct {
cc *grpc.ClientConn
}
func NewPluginInterfaceClient(cc *grpc.ClientConn) PluginInterfaceClient {
return &pluginInterfaceClient{cc}
}
func (c *pluginInterfaceClient) Initialization(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ErrorStatus, error) {
out := new(ErrorStatus)
err := grpc.Invoke(ctx, "/proto.PluginInterface/Initialization", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pluginInterfaceClient) Deploy(ctx context.Context, in *DeployRequest, opts ...grpc.CallOption) (*ErrorStatus, error) {
out := new(ErrorStatus)
err := grpc.Invoke(ctx, "/proto.PluginInterface/Deploy", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *pluginInterfaceClient) UnInitialization(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ErrorStatus, error) {
out := new(ErrorStatus)
err := grpc.Invoke(ctx, "/proto.PluginInterface/UnInitialization", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for PluginInterface service
type PluginInterfaceServer interface {
Initialization(context.Context, *Empty) (*ErrorStatus, error)
Deploy(context.Context, *DeployRequest) (*ErrorStatus, error)
UnInitialization(context.Context, *Empty) (*ErrorStatus, error)
}
func RegisterPluginInterfaceServer(s *grpc.Server, srv PluginInterfaceServer) {
s.RegisterService(&_PluginInterface_serviceDesc, srv)
}
func _PluginInterface_Initialization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PluginInterfaceServer).Initialization(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.PluginInterface/Initialization",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PluginInterfaceServer).Initialization(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
func _PluginInterface_Deploy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeployRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PluginInterfaceServer).Deploy(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.PluginInterface/Deploy",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PluginInterfaceServer).Deploy(ctx, req.(*DeployRequest))
}
return interceptor(ctx, in, info, handler)
}
func _PluginInterface_UnInitialization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(PluginInterfaceServer).UnInitialization(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/proto.PluginInterface/UnInitialization",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PluginInterfaceServer).UnInitialization(ctx, req.(*Empty))
}
return interceptor(ctx, in, info, handler)
}
var _PluginInterface_serviceDesc = grpc.ServiceDesc{
ServiceName: "proto.PluginInterface",
HandlerType: (*PluginInterfaceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Initialization",
Handler: _PluginInterface_Initialization_Handler,
},
{
MethodName: "Deploy",
Handler: _PluginInterface_Deploy_Handler,
},
{
MethodName: "UnInitialization",
Handler: _PluginInterface_UnInitialization_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "plugin_interface.proto",
}
func init() { proto1.RegisterFile("plugin_interface.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 208 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2b, 0xc8, 0x29, 0x4d,
0xcf, 0xcc, 0x8b, 0xcf, 0xcc, 0x2b, 0x49, 0x2d, 0x4a, 0x4b, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca,
0x2f, 0xc9, 0x17, 0x62, 0x05, 0x53, 0x4a, 0xa6, 0x5c, 0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