github.com/yacovm/fabric@v2.0.0-alpha.0.20191128145320-c5d4087dc723+incompatible/common/grpclogging/testpb/echo.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: echo.proto 3 4 package testpb 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 grpc "google.golang.org/grpc" 11 math "math" 12 ) 13 14 // Reference imports to suppress errors if they are not otherwise used. 15 var _ = proto.Marshal 16 var _ = fmt.Errorf 17 var _ = math.Inf 18 19 // This is a compile-time assertion to ensure that this generated file 20 // is compatible with the proto package it is being compiled against. 21 // A compilation error at this line likely means your copy of the 22 // proto package needs to be updated. 23 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 24 25 type Message struct { 26 Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` 27 Sequence int32 `protobuf:"varint,2,opt,name=sequence,proto3" json:"sequence,omitempty"` 28 XXX_NoUnkeyedLiteral struct{} `json:"-"` 29 XXX_unrecognized []byte `json:"-"` 30 XXX_sizecache int32 `json:"-"` 31 } 32 33 func (m *Message) Reset() { *m = Message{} } 34 func (m *Message) String() string { return proto.CompactTextString(m) } 35 func (*Message) ProtoMessage() {} 36 func (*Message) Descriptor() ([]byte, []int) { 37 return fileDescriptor_08134aea513e0001, []int{0} 38 } 39 40 func (m *Message) XXX_Unmarshal(b []byte) error { 41 return xxx_messageInfo_Message.Unmarshal(m, b) 42 } 43 func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 44 return xxx_messageInfo_Message.Marshal(b, m, deterministic) 45 } 46 func (m *Message) XXX_Merge(src proto.Message) { 47 xxx_messageInfo_Message.Merge(m, src) 48 } 49 func (m *Message) XXX_Size() int { 50 return xxx_messageInfo_Message.Size(m) 51 } 52 func (m *Message) XXX_DiscardUnknown() { 53 xxx_messageInfo_Message.DiscardUnknown(m) 54 } 55 56 var xxx_messageInfo_Message proto.InternalMessageInfo 57 58 func (m *Message) GetMessage() string { 59 if m != nil { 60 return m.Message 61 } 62 return "" 63 } 64 65 func (m *Message) GetSequence() int32 { 66 if m != nil { 67 return m.Sequence 68 } 69 return 0 70 } 71 72 func init() { 73 proto.RegisterType((*Message)(nil), "testpb.Message") 74 } 75 76 func init() { proto.RegisterFile("echo.proto", fileDescriptor_08134aea513e0001) } 77 78 var fileDescriptor_08134aea513e0001 = []byte{ 79 // 198 bytes of a gzipped FileDescriptorProto 80 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x8f, 0xb1, 0x4b, 0xc5, 0x30, 81 0x10, 0xc6, 0x89, 0xe8, 0x7b, 0x7a, 0x0e, 0x42, 0xa6, 0xd2, 0xa9, 0x38, 0x65, 0x4a, 0xa4, 0x0e, 82 0xe2, 0x24, 0x08, 0x8e, 0x2e, 0x75, 0x73, 0x6b, 0xce, 0x33, 0x09, 0x36, 0xbd, 0x98, 0xa4, 0x82, 83 0xff, 0xbd, 0xd8, 0xaa, 0x83, 0xcb, 0xdb, 0xee, 0x77, 0xdc, 0xfd, 0x3e, 0x3e, 0x00, 0x42, 0xcf, 84 0x3a, 0x65, 0xae, 0x2c, 0x77, 0x95, 0x4a, 0x4d, 0xf6, 0xf2, 0x0e, 0xf6, 0x8f, 0x54, 0xca, 0xe8, 85 0x48, 0x36, 0xb0, 0x8f, 0xdb, 0xd8, 0x88, 0x4e, 0xa8, 0xb3, 0xe1, 0x17, 0x65, 0x0b, 0xa7, 0x85, 86 0xde, 0x17, 0x9a, 0x91, 0x9a, 0xa3, 0x4e, 0xa8, 0x93, 0xe1, 0x8f, 0xfb, 0x37, 0x38, 0x7f, 0x40, 87 0xcf, 0x4f, 0x94, 0x3f, 0x02, 0x92, 0x54, 0x70, 0xfc, 0x8d, 0xf2, 0x42, 0x6f, 0x01, 0xfa, 0xc7, 88 0xde, 0xfe, 0x5f, 0xc8, 0x1e, 0x60, 0x7d, 0xac, 0x99, 0xc6, 0x78, 0xf8, 0x5e, 0x89, 0x2b, 0x71, 89 0x7f, 0xfb, 0x7c, 0xe3, 0x42, 0xf5, 0x8b, 0xd5, 0xc8, 0xd1, 0xf8, 0xcf, 0x44, 0x79, 0xa2, 0x17, 90 0x47, 0xd9, 0xbc, 0x8e, 0x36, 0x07, 0x34, 0xc8, 0x31, 0xf2, 0x6c, 0x5c, 0x4e, 0x38, 0xb1, 0x73, 91 0x61, 0x76, 0x66, 0xd3, 0xd8, 0xdd, 0xda, 0xfb, 0xfa, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x33, 92 0xa2, 0xe6, 0x05, 0x01, 0x00, 0x00, 93 } 94 95 // Reference imports to suppress errors if they are not otherwise used. 96 var _ context.Context 97 var _ grpc.ClientConn 98 99 // This is a compile-time assertion to ensure that this generated file 100 // is compatible with the grpc package it is being compiled against. 101 const _ = grpc.SupportPackageIsVersion4 102 103 // EchoServiceClient is the client API for EchoService service. 104 // 105 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 106 type EchoServiceClient interface { 107 Echo(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) 108 EchoStream(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoStreamClient, error) 109 } 110 111 type echoServiceClient struct { 112 cc *grpc.ClientConn 113 } 114 115 func NewEchoServiceClient(cc *grpc.ClientConn) EchoServiceClient { 116 return &echoServiceClient{cc} 117 } 118 119 func (c *echoServiceClient) Echo(ctx context.Context, in *Message, opts ...grpc.CallOption) (*Message, error) { 120 out := new(Message) 121 err := c.cc.Invoke(ctx, "/testpb.EchoService/Echo", in, out, opts...) 122 if err != nil { 123 return nil, err 124 } 125 return out, nil 126 } 127 128 func (c *echoServiceClient) EchoStream(ctx context.Context, opts ...grpc.CallOption) (EchoService_EchoStreamClient, error) { 129 stream, err := c.cc.NewStream(ctx, &_EchoService_serviceDesc.Streams[0], "/testpb.EchoService/EchoStream", opts...) 130 if err != nil { 131 return nil, err 132 } 133 x := &echoServiceEchoStreamClient{stream} 134 return x, nil 135 } 136 137 type EchoService_EchoStreamClient interface { 138 Send(*Message) error 139 Recv() (*Message, error) 140 grpc.ClientStream 141 } 142 143 type echoServiceEchoStreamClient struct { 144 grpc.ClientStream 145 } 146 147 func (x *echoServiceEchoStreamClient) Send(m *Message) error { 148 return x.ClientStream.SendMsg(m) 149 } 150 151 func (x *echoServiceEchoStreamClient) Recv() (*Message, error) { 152 m := new(Message) 153 if err := x.ClientStream.RecvMsg(m); err != nil { 154 return nil, err 155 } 156 return m, nil 157 } 158 159 // EchoServiceServer is the server API for EchoService service. 160 type EchoServiceServer interface { 161 Echo(context.Context, *Message) (*Message, error) 162 EchoStream(EchoService_EchoStreamServer) error 163 } 164 165 func RegisterEchoServiceServer(s *grpc.Server, srv EchoServiceServer) { 166 s.RegisterService(&_EchoService_serviceDesc, srv) 167 } 168 169 func _EchoService_Echo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 170 in := new(Message) 171 if err := dec(in); err != nil { 172 return nil, err 173 } 174 if interceptor == nil { 175 return srv.(EchoServiceServer).Echo(ctx, in) 176 } 177 info := &grpc.UnaryServerInfo{ 178 Server: srv, 179 FullMethod: "/testpb.EchoService/Echo", 180 } 181 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 182 return srv.(EchoServiceServer).Echo(ctx, req.(*Message)) 183 } 184 return interceptor(ctx, in, info, handler) 185 } 186 187 func _EchoService_EchoStream_Handler(srv interface{}, stream grpc.ServerStream) error { 188 return srv.(EchoServiceServer).EchoStream(&echoServiceEchoStreamServer{stream}) 189 } 190 191 type EchoService_EchoStreamServer interface { 192 Send(*Message) error 193 Recv() (*Message, error) 194 grpc.ServerStream 195 } 196 197 type echoServiceEchoStreamServer struct { 198 grpc.ServerStream 199 } 200 201 func (x *echoServiceEchoStreamServer) Send(m *Message) error { 202 return x.ServerStream.SendMsg(m) 203 } 204 205 func (x *echoServiceEchoStreamServer) Recv() (*Message, error) { 206 m := new(Message) 207 if err := x.ServerStream.RecvMsg(m); err != nil { 208 return nil, err 209 } 210 return m, nil 211 } 212 213 var _EchoService_serviceDesc = grpc.ServiceDesc{ 214 ServiceName: "testpb.EchoService", 215 HandlerType: (*EchoServiceServer)(nil), 216 Methods: []grpc.MethodDesc{ 217 { 218 MethodName: "Echo", 219 Handler: _EchoService_Echo_Handler, 220 }, 221 }, 222 Streams: []grpc.StreamDesc{ 223 { 224 StreamName: "EchoStream", 225 Handler: _EchoService_EchoStream_Handler, 226 ServerStreams: true, 227 ClientStreams: true, 228 }, 229 }, 230 Metadata: "echo.proto", 231 }