123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- // Code generated by protoc-gen-go. DO NOT EDIT.
- // source: test.proto
- /*
- Package pb is a generated protocol buffer package.
- It is generated from these files:
- test.proto
- It has these top-level messages:
- Request
- Response
- */
- package pb
- import proto "github.com/golang/protobuf/proto"
- import fmt "fmt"
- import math "math"
- 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 Request struct {
- Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
- }
- func (m *Request) Reset() { *m = Request{} }
- func (m *Request) String() string { return proto.CompactTextString(m) }
- func (*Request) ProtoMessage() {}
- func (*Request) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
- func (m *Request) GetMsg() string {
- if m != nil {
- return m.Msg
- }
- return ""
- }
- type Response struct {
- Msg string `protobuf:"bytes,1,opt,name=msg" json:"msg,omitempty"`
- }
- func (m *Response) Reset() { *m = Response{} }
- func (m *Response) String() string { return proto.CompactTextString(m) }
- func (*Response) ProtoMessage() {}
- func (*Response) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
- func (m *Response) GetMsg() string {
- if m != nil {
- return m.Msg
- }
- return ""
- }
- func init() {
- proto.RegisterType((*Request)(nil), "pb.Request")
- proto.RegisterType((*Response)(nil), "pb.Response")
- }
- // 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 Test service
- type TestClient interface {
- Test(ctx context.Context, opts ...grpc.CallOption) (Test_TestClient, error)
- }
- type testClient struct {
- cc *grpc.ClientConn
- }
- func NewTestClient(cc *grpc.ClientConn) TestClient {
- return &testClient{cc}
- }
- func (c *testClient) Test(ctx context.Context, opts ...grpc.CallOption) (Test_TestClient, error) {
- stream, err := grpc.NewClientStream(ctx, &_Test_serviceDesc.Streams[0], c.cc, "/pb.Test/Test", opts...)
- if err != nil {
- return nil, err
- }
- x := &testTestClient{stream}
- return x, nil
- }
- type Test_TestClient interface {
- Send(*Request) error
- Recv() (*Response, error)
- grpc.ClientStream
- }
- type testTestClient struct {
- grpc.ClientStream
- }
- func (x *testTestClient) Send(m *Request) error {
- return x.ClientStream.SendMsg(m)
- }
- func (x *testTestClient) Recv() (*Response, error) {
- m := new(Response)
- if err := x.ClientStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- // Server API for Test service
- type TestServer interface {
- Test(Test_TestServer) error
- }
- func RegisterTestServer(s *grpc.Server, srv TestServer) {
- s.RegisterService(&_Test_serviceDesc, srv)
- }
- func _Test_Test_Handler(srv interface{}, stream grpc.ServerStream) error {
- return srv.(TestServer).Test(&testTestServer{stream})
- }
- type Test_TestServer interface {
- Send(*Response) error
- Recv() (*Request, error)
- grpc.ServerStream
- }
- type testTestServer struct {
- grpc.ServerStream
- }
- func (x *testTestServer) Send(m *Response) error {
- return x.ServerStream.SendMsg(m)
- }
- func (x *testTestServer) Recv() (*Request, error) {
- m := new(Request)
- if err := x.ServerStream.RecvMsg(m); err != nil {
- return nil, err
- }
- return m, nil
- }
- var _Test_serviceDesc = grpc.ServiceDesc{
- ServiceName: "pb.Test",
- HandlerType: (*TestServer)(nil),
- Methods: []grpc.MethodDesc{},
- Streams: []grpc.StreamDesc{
- {
- StreamName: "Test",
- Handler: _Test_Test_Handler,
- ServerStreams: true,
- ClientStreams: true,
- },
- },
- Metadata: "test.proto",
- }
- func init() { proto.RegisterFile("test.proto", fileDescriptor0) }
- var fileDescriptor0 = []byte{
- // 114 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x49, 0x2d, 0x2e,
- 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0x92, 0xe6, 0x62, 0x0f, 0x4a,
- 0x2d, 0x2c, 0x4d, 0x2d, 0x2e, 0x11, 0x12, 0xe0, 0x62, 0xce, 0x2d, 0x4e, 0x97, 0x60, 0x54, 0x60,
- 0xd4, 0xe0, 0x0c, 0x02, 0x31, 0x95, 0x64, 0xb8, 0x38, 0x82, 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a,
- 0x53, 0x31, 0x65, 0x8d, 0xf4, 0xb9, 0x58, 0x42, 0x40, 0xfa, 0xd4, 0xa1, 0x34, 0xb7, 0x5e, 0x41,
- 0x92, 0x1e, 0xd4, 0x30, 0x29, 0x1e, 0x08, 0x07, 0xa2, 0x59, 0x89, 0x41, 0x83, 0xd1, 0x80, 0x31,
- 0x89, 0x0d, 0x6c, 0xad, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x25, 0xc3, 0x70, 0x84, 0x00,
- 0x00, 0x00,
- }
|