-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.pb.go
280 lines (254 loc) · 11.4 KB
/
domain.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: domain.proto
package grpcdomain
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// 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.ProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("domain.proto", fileDescriptor_73e6234e76dbdb84) }
var fileDescriptor_73e6234e76dbdb84 = []byte{
// 238 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b,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x1f, 0x0d, 0xaa, 0x55, 0x38,
0x50, 0xba, 0x6b, 0x4c, 0xfe, 0x34, 0xa6, 0x01, 0x6f, 0xcc, 0x61, 0xff, 0xe6, 0xfb, 0xe8, 0x3f,
0xca, 0xf3, 0xb8, 0x91, 0xa0, 0xc1, 0xb9, 0xf8, 0x27, 0xd1, 0x4b, 0x5f, 0x67, 0xfd, 0xc7, 0x5d,
0x7f, 0x05, 0x00, 0x00, 0xff, 0xff, 0xdb, 0x31, 0xc4, 0xd9, 0x28, 0x02, 0x00, 0x00,
}
// 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
// DomainClient is the client API for Domain service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DomainClient interface {
// GetServices returns the availible services and their locations
GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesReply, error)
// ShareIdentityList Exchanges the IdentityList which the domain is aware of
ShareIdentityList(ctx context.Context, in *IdentityListRequest, opts ...grpc.CallOption) (*IdentityListReply, error)
// DumpIdentityList Dumps the IdentityList which the domain is aware of
DumpIdentityList(ctx context.Context, in *DumpIdentityListRequest, opts ...grpc.CallOption) (*IdentityListReply, error)
// OpenPosition declares the new service which is needed and requests Appointments
OpenPosition(ctx context.Context, in *OpenPositionRequest, opts ...grpc.CallOption) (*OpenPositionReply, error)
// ClosePosition ends an election and informs if the position was awarded
ClosePosition(ctx context.Context, in *ClosePositionRequest, opts ...grpc.CallOption) (*ClosePositionReply, error)
}
type domainClient struct {
cc *grpc.ClientConn
}
func NewDomainClient(cc *grpc.ClientConn) DomainClient {
return &domainClient{cc}
}
func (c *domainClient) GetServices(ctx context.Context, in *GetServicesRequest, opts ...grpc.CallOption) (*GetServicesReply, error) {
out := new(GetServicesReply)
err := c.cc.Invoke(ctx, "/grpcdomain.Domain/GetServices", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainClient) ShareIdentityList(ctx context.Context, in *IdentityListRequest, opts ...grpc.CallOption) (*IdentityListReply, error) {
out := new(IdentityListReply)
err := c.cc.Invoke(ctx, "/grpcdomain.Domain/ShareIdentityList", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainClient) DumpIdentityList(ctx context.Context, in *DumpIdentityListRequest, opts ...grpc.CallOption) (*IdentityListReply, error) {
out := new(IdentityListReply)
err := c.cc.Invoke(ctx, "/grpcdomain.Domain/DumpIdentityList", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainClient) OpenPosition(ctx context.Context, in *OpenPositionRequest, opts ...grpc.CallOption) (*OpenPositionReply, error) {
out := new(OpenPositionReply)
err := c.cc.Invoke(ctx, "/grpcdomain.Domain/OpenPosition", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *domainClient) ClosePosition(ctx context.Context, in *ClosePositionRequest, opts ...grpc.CallOption) (*ClosePositionReply, error) {
out := new(ClosePositionReply)
err := c.cc.Invoke(ctx, "/grpcdomain.Domain/ClosePosition", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DomainServer is the server API for Domain service.
type DomainServer interface {
// GetServices returns the availible services and their locations
GetServices(context.Context, *GetServicesRequest) (*GetServicesReply, error)
// ShareIdentityList Exchanges the IdentityList which the domain is aware of
ShareIdentityList(context.Context, *IdentityListRequest) (*IdentityListReply, error)
// DumpIdentityList Dumps the IdentityList which the domain is aware of
DumpIdentityList(context.Context, *DumpIdentityListRequest) (*IdentityListReply, error)
// OpenPosition declares the new service which is needed and requests Appointments
OpenPosition(context.Context, *OpenPositionRequest) (*OpenPositionReply, error)
// ClosePosition ends an election and informs if the position was awarded
ClosePosition(context.Context, *ClosePositionRequest) (*ClosePositionReply, error)
}
// UnimplementedDomainServer can be embedded to have forward compatible implementations.
type UnimplementedDomainServer struct {
}
func (*UnimplementedDomainServer) GetServices(ctx context.Context, req *GetServicesRequest) (*GetServicesReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetServices not implemented")
}
func (*UnimplementedDomainServer) ShareIdentityList(ctx context.Context, req *IdentityListRequest) (*IdentityListReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ShareIdentityList not implemented")
}
func (*UnimplementedDomainServer) DumpIdentityList(ctx context.Context, req *DumpIdentityListRequest) (*IdentityListReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method DumpIdentityList not implemented")
}
func (*UnimplementedDomainServer) OpenPosition(ctx context.Context, req *OpenPositionRequest) (*OpenPositionReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method OpenPosition not implemented")
}
func (*UnimplementedDomainServer) ClosePosition(ctx context.Context, req *ClosePositionRequest) (*ClosePositionReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method ClosePosition not implemented")
}
func RegisterDomainServer(s *grpc.Server, srv DomainServer) {
s.RegisterService(&_Domain_serviceDesc, srv)
}
func _Domain_GetServices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetServicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).GetServices(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpcdomain.Domain/GetServices",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).GetServices(ctx, req.(*GetServicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Domain_ShareIdentityList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(IdentityListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).ShareIdentityList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpcdomain.Domain/ShareIdentityList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).ShareIdentityList(ctx, req.(*IdentityListRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Domain_DumpIdentityList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DumpIdentityListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).DumpIdentityList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpcdomain.Domain/DumpIdentityList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).DumpIdentityList(ctx, req.(*DumpIdentityListRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Domain_OpenPosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OpenPositionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).OpenPosition(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpcdomain.Domain/OpenPosition",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).OpenPosition(ctx, req.(*OpenPositionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Domain_ClosePosition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ClosePositionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DomainServer).ClosePosition(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/grpcdomain.Domain/ClosePosition",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DomainServer).ClosePosition(ctx, req.(*ClosePositionRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Domain_serviceDesc = grpc.ServiceDesc{
ServiceName: "grpcdomain.Domain",
HandlerType: (*DomainServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetServices",
Handler: _Domain_GetServices_Handler,
},
{
MethodName: "ShareIdentityList",
Handler: _Domain_ShareIdentityList_Handler,
},
{
MethodName: "DumpIdentityList",
Handler: _Domain_DumpIdentityList_Handler,
},
{
MethodName: "OpenPosition",
Handler: _Domain_OpenPosition_Handler,
},
{
MethodName: "ClosePosition",
Handler: _Domain_ClosePosition_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "domain.proto",
}