1 // Code generated by protoc-gen-go.
6 Package pb is a generated protocol buffer package.
8 It is generated from these files:
11 It has these top-level messages:
17 import proto "github.com/golang/protobuf/proto"
22 context "golang.org/x/net/context"
23 grpc "google.golang.org/grpc"
26 // Reference imports to suppress errors if they are not otherwise used.
31 // This is a compile-time assertion to ensure that this generated file
32 // is compatible with the proto package it is being compiled against.
33 // A compilation error at this line likely means your copy of the
34 // proto package needs to be updated.
35 const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
37 type TestRequest struct {
38 A string `protobuf:"bytes,1,opt,name=a" json:"a,omitempty"`
39 B int64 `protobuf:"varint,2,opt,name=b" json:"b,omitempty"`
42 func (m *TestRequest) Reset() { *m = TestRequest{} }
43 func (m *TestRequest) String() string { return proto.CompactTextString(m) }
44 func (*TestRequest) ProtoMessage() {}
45 func (*TestRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
47 func (m *TestRequest) GetA() string {
54 func (m *TestRequest) GetB() int64 {
61 type TestResponse struct {
62 V string `protobuf:"bytes,1,opt,name=v" json:"v,omitempty"`
65 func (m *TestResponse) Reset() { *m = TestResponse{} }
66 func (m *TestResponse) String() string { return proto.CompactTextString(m) }
67 func (*TestResponse) ProtoMessage() {}
68 func (*TestResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
70 func (m *TestResponse) GetV() string {
78 proto.RegisterType((*TestRequest)(nil), "pb.TestRequest")
79 proto.RegisterType((*TestResponse)(nil), "pb.TestResponse")
82 // Reference imports to suppress errors if they are not otherwise used.
86 // This is a compile-time assertion to ensure that this generated file
87 // is compatible with the grpc package it is being compiled against.
88 const _ = grpc.SupportPackageIsVersion4
90 // Client API for Test service
92 type TestClient interface {
93 Test(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error)
96 type testClient struct {
100 func NewTestClient(cc *grpc.ClientConn) TestClient {
101 return &testClient{cc}
104 func (c *testClient) Test(ctx context.Context, in *TestRequest, opts ...grpc.CallOption) (*TestResponse, error) {
105 out := new(TestResponse)
106 err := grpc.Invoke(ctx, "/pb.Test/Test", in, out, c.cc, opts...)
113 // Server API for Test service
115 type TestServer interface {
116 Test(context.Context, *TestRequest) (*TestResponse, error)
119 func RegisterTestServer(s *grpc.Server, srv TestServer) {
120 s.RegisterService(&_Test_serviceDesc, srv)
123 func _Test_Test_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
124 in := new(TestRequest)
125 if err := dec(in); err != nil {
128 if interceptor == nil {
129 return srv.(TestServer).Test(ctx, in)
131 info := &grpc.UnaryServerInfo{
133 FullMethod: "/pb.Test/Test",
135 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
136 return srv.(TestServer).Test(ctx, req.(*TestRequest))
138 return interceptor(ctx, in, info, handler)
141 var _Test_serviceDesc = grpc.ServiceDesc{
142 ServiceName: "pb.Test",
143 HandlerType: (*TestServer)(nil),
144 Methods: []grpc.MethodDesc{
147 Handler: _Test_Test_Handler,
150 Streams: []grpc.StreamDesc{},
151 Metadata: "test.proto",
154 func init() { proto.RegisterFile("test.proto", fileDescriptor0) }
156 var fileDescriptor0 = []byte{
157 // 129 bytes of a gzipped FileDescriptorProto
158 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x2d, 0x2e,
159 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0xd2, 0xe4, 0xe2, 0x0e, 0x49,
160 0x2d, 0x2e, 0x09, 0x4a, 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0xe2, 0xe1, 0x62, 0x4c, 0x94, 0x60,
161 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x62, 0x4c, 0x04, 0xf1, 0x92, 0x24, 0x98, 0x14, 0x18, 0x35, 0x98,
162 0x83, 0x18, 0x93, 0x94, 0x64, 0xb8, 0x78, 0x20, 0x4a, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x41,
163 0xb2, 0x65, 0x30, 0xb5, 0x65, 0x46, 0xc6, 0x5c, 0x2c, 0x20, 0x59, 0x21, 0x6d, 0x28, 0xcd, 0xaf,
164 0x57, 0x90, 0xa4, 0x87, 0x64, 0xb4, 0x94, 0x00, 0x42, 0x00, 0x62, 0x80, 0x12, 0x43, 0x12, 0x1b,
165 0xd8, 0x21, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x49, 0xfc, 0xd8, 0xf1, 0x96, 0x00, 0x00,