-
Notifications
You must be signed in to change notification settings - Fork 113
/
service.pb.go
142 lines (117 loc) · 4.54 KB
/
service.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
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: service.proto
/*
Package echopb is a generated protocol buffer package.
It is generated from these files:
service.proto
It has these top-level messages:
EchoMessage
*/
package echopb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
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
type EchoMessage struct {
Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
}
func (m *EchoMessage) Reset() { *m = EchoMessage{} }
func (m *EchoMessage) String() string { return proto.CompactTextString(m) }
func (*EchoMessage) ProtoMessage() {}
func (*EchoMessage) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *EchoMessage) GetValue() string {
if m != nil {
return m.Value
}
return ""
}
func init() {
proto.RegisterType((*EchoMessage)(nil), "echopb.EchoMessage")
}
// 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 EchoService service
type EchoServiceClient interface {
Echo(ctx context.Context, in *EchoMessage, opts ...grpc.CallOption) (*EchoMessage, error)
}
type echoServiceClient struct {
cc *grpc.ClientConn
}
func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient {
return &echoServiceClient{cc}
}
func (c *echoServiceClient) Echo(ctx context.Context, in *EchoMessage, opts ...grpc.CallOption) (*EchoMessage, error) {
out := new(EchoMessage)
err := grpc.Invoke(ctx, "/echopb.EchoService/Echo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for EchoService service
type EchoServiceServer interface {
Echo(context.Context, *EchoMessage) (*EchoMessage, error)
}
func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer) {
s.RegisterService(&_EchoService_serviceDesc, srv)
}
func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EchoMessage)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EchoServiceServer).Echo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/echopb.EchoService/Echo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EchoServiceServer).Echo(ctx, req.(*EchoMessage))
}
return interceptor(ctx, in, info, handler)
}
var _EchoService_serviceDesc = grpc.ServiceDesc{
ServiceName: "echopb.EchoService",
HandlerType: (*EchoServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Echo",
Handler: _EchoService_Echo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service.proto",
}
func init() { proto.RegisterFile("service.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 155 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2d, 0x4e, 0x2d, 0x2a,
0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0x4d, 0xce, 0xc8, 0x2f,
0x48, 0x92, 0x92, 0x49, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x4f, 0x2c, 0xc8, 0xd4, 0x4f, 0xcc,
0xcb, 0xcb, 0x2f, 0x49, 0x2c, 0xc9, 0xcc, 0xcf, 0x2b, 0x86, 0xa8, 0x52, 0x52, 0xe6, 0xe2, 0x76,
0x4d, 0xce, 0xc8, 0xf7, 0x4d, 0x2d, 0x2e, 0x4e, 0x4c, 0x4f, 0x15, 0x12, 0xe1, 0x62, 0x2d, 0x4b,
0xcc, 0x29, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x82, 0x70, 0x8c, 0x42, 0x20, 0x8a,
0x82, 0x21, 0xe6, 0x0b, 0xb9, 0x72, 0xb1, 0x80, 0xb8, 0x42, 0xc2, 0x7a, 0x10, 0x2b, 0xf4, 0x90,
0x4c, 0x90, 0xc2, 0x26, 0xa8, 0x24, 0xdc, 0x74, 0xf9, 0xc9, 0x64, 0x26, 0x5e, 0x25, 0x0e, 0xfd,
0x32, 0x43, 0x7d, 0x90, 0xbc, 0x15, 0xa3, 0x56, 0x12, 0x1b, 0xd8, 0x05, 0xc6, 0x80, 0x00, 0x00,
0x00, 0xff, 0xff, 0x03, 0x79, 0xc3, 0xa8, 0xb8, 0x00, 0x00, 0x00,
}