-
Notifications
You must be signed in to change notification settings - Fork 0
/
alfa.pb.go
240 lines (208 loc) · 8.32 KB
/
alfa.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: alfa.proto
/*
Package alfa is a generated protocol buffer package.
Alfa Service
Alfa Service API consists of a single service which returns a message.
It is generated from these files:
alfa.proto
It has these top-level messages:
Message
*/
package alfa
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_protobuf1 "github.com/golang/protobuf/ptypes/empty"
import beta "github.com/luigi-riefolo/eGO/src/beta/pb"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.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 _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Message represents a simple message sent to the Alfa service.
type Message struct {
// Id represents the message identifier.
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// The message to be sent.
Msg string `protobuf:"bytes,2,opt,name=msg" json:"msg,omitempty"`
}
func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Message) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *Message) GetMsg() string {
if m != nil {
return m.Msg
}
return ""
}
func init() {
proto.RegisterType((*Message)(nil), "alfa.Message")
}
// 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
// Client API for AlfaService service
type AlfaServiceClient interface {
// Get method receives a simple message and returns it.
// The message posted as the id parameter will also be returned.
Get(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Message, error)
// Alfa method sets a simple message.
Set(ctx context.Context, in *Message, opts ...grpc.CallOption) (*google_protobuf1.Empty, error)
Test(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*beta.Message, error)
}
type alfaServiceClient struct {
cc *grpc.ClientConn
}
func NewAlfaServiceClient(cc *grpc.ClientConn) AlfaServiceClient {
return &alfaServiceClient{cc}
}
func (c *alfaServiceClient) Get(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*Message, error) {
out := new(Message)
err := grpc.Invoke(ctx, "/alfa.AlfaService/Get", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alfaServiceClient) Set(ctx context.Context, in *Message, opts ...grpc.CallOption) (*google_protobuf1.Empty, error) {
out := new(google_protobuf1.Empty)
err := grpc.Invoke(ctx, "/alfa.AlfaService/Set", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *alfaServiceClient) Test(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*beta.Message, error) {
out := new(beta.Message)
err := grpc.Invoke(ctx, "/alfa.AlfaService/Test", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for AlfaService service
type AlfaServiceServer interface {
// Get method receives a simple message and returns it.
// The message posted as the id parameter will also be returned.
Get(context.Context, *google_protobuf1.Empty) (*Message, error)
// Alfa method sets a simple message.
Set(context.Context, *Message) (*google_protobuf1.Empty, error)
Test(context.Context, *google_protobuf1.Empty) (*beta.Message, error)
}
func RegisterAlfaServiceServer(s *grpc.Server, srv AlfaServiceServer) {
s.RegisterService(&_AlfaService_serviceDesc, srv)
}
func _AlfaService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlfaServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/alfa.AlfaService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlfaServiceServer).Get(ctx, req.(*google_protobuf1.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _AlfaService_Set_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(Message)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlfaServiceServer).Set(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/alfa.AlfaService/Set",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlfaServiceServer).Set(ctx, req.(*Message))
}
return interceptor(ctx, in, info, handler)
}
func _AlfaService_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AlfaServiceServer).Test(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/alfa.AlfaService/Test",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AlfaServiceServer).Test(ctx, req.(*google_protobuf1.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _AlfaService_serviceDesc = grpc.ServiceDesc{
ServiceName: "alfa.AlfaService",
HandlerType: (*AlfaServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Get",
Handler: _AlfaService_Get_Handler,
},
{
MethodName: "Set",
Handler: _AlfaService_Set_Handler,
},
{
MethodName: "Test",
Handler: _AlfaService_Test_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "alfa.proto",
}
func init() { proto.RegisterFile("alfa.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 290 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xbf, 0x4e, 0xc3, 0x30,
0x10, 0x87, 0x95, 0xb4, 0x2a, 0xc2, 0xd0, 0x02, 0x16, 0x7f, 0xaa, 0xc0, 0x80, 0x32, 0x21, 0x10,
0x3e, 0x41, 0x37, 0x36, 0x2a, 0xaa, 0x4e, 0x08, 0x89, 0x32, 0xb1, 0x39, 0xe9, 0xc5, 0x58, 0x4a,
0xe2, 0x28, 0xbe, 0x54, 0x62, 0xe5, 0x15, 0x78, 0x34, 0x76, 0x26, 0x1e, 0x04, 0xd9, 0x49, 0x85,
0x18, 0x60, 0xca, 0xc5, 0xbf, 0xbb, 0x4f, 0xdf, 0xd9, 0x8c, 0xc9, 0x3c, 0x93, 0xa2, 0xaa, 0x0d,
0x19, 0xde, 0x77, 0x75, 0x74, 0xa2, 0x8c, 0x51, 0x39, 0x82, 0xac, 0x34, 0xc8, 0xb2, 0x34, 0x24,
0x49, 0x9b, 0xd2, 0xb6, 0x3d, 0xd1, 0x71, 0x97, 0xfa, 0xbf, 0xa4, 0x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