gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/service/grpc/proto/test.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: go-micro/service/grpc/proto/test.proto
     3  
     4  package test
     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 Request struct {
    26  	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
    27  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    28  	XXX_unrecognized     []byte   `json:"-"`
    29  	XXX_sizecache        int32    `json:"-"`
    30  }
    31  
    32  func (m *Request) Reset()         { *m = Request{} }
    33  func (m *Request) String() string { return proto.CompactTextString(m) }
    34  func (*Request) ProtoMessage()    {}
    35  func (*Request) Descriptor() ([]byte, []int) {
    36  	return fileDescriptor_a22a4245ce525bcd, []int{0}
    37  }
    38  
    39  func (m *Request) XXX_Unmarshal(b []byte) error {
    40  	return xxx_messageInfo_Request.Unmarshal(m, b)
    41  }
    42  func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    43  	return xxx_messageInfo_Request.Marshal(b, m, deterministic)
    44  }
    45  func (m *Request) XXX_Merge(src proto.Message) {
    46  	xxx_messageInfo_Request.Merge(m, src)
    47  }
    48  func (m *Request) XXX_Size() int {
    49  	return xxx_messageInfo_Request.Size(m)
    50  }
    51  func (m *Request) XXX_DiscardUnknown() {
    52  	xxx_messageInfo_Request.DiscardUnknown(m)
    53  }
    54  
    55  var xxx_messageInfo_Request proto.InternalMessageInfo
    56  
    57  func (m *Request) GetName() string {
    58  	if m != nil {
    59  		return m.Name
    60  	}
    61  	return ""
    62  }
    63  
    64  type Response struct {
    65  	Msg                  string   `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"`
    66  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
    67  	XXX_unrecognized     []byte   `json:"-"`
    68  	XXX_sizecache        int32    `json:"-"`
    69  }
    70  
    71  func (m *Response) Reset()         { *m = Response{} }
    72  func (m *Response) String() string { return proto.CompactTextString(m) }
    73  func (*Response) ProtoMessage()    {}
    74  func (*Response) Descriptor() ([]byte, []int) {
    75  	return fileDescriptor_a22a4245ce525bcd, []int{1}
    76  }
    77  
    78  func (m *Response) XXX_Unmarshal(b []byte) error {
    79  	return xxx_messageInfo_Response.Unmarshal(m, b)
    80  }
    81  func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    82  	return xxx_messageInfo_Response.Marshal(b, m, deterministic)
    83  }
    84  func (m *Response) XXX_Merge(src proto.Message) {
    85  	xxx_messageInfo_Response.Merge(m, src)
    86  }
    87  func (m *Response) XXX_Size() int {
    88  	return xxx_messageInfo_Response.Size(m)
    89  }
    90  func (m *Response) XXX_DiscardUnknown() {
    91  	xxx_messageInfo_Response.DiscardUnknown(m)
    92  }
    93  
    94  var xxx_messageInfo_Response proto.InternalMessageInfo
    95  
    96  func (m *Response) GetMsg() string {
    97  	if m != nil {
    98  		return m.Msg
    99  	}
   100  	return ""
   101  }
   102  
   103  func init() {
   104  	proto.RegisterType((*Request)(nil), "Request")
   105  	proto.RegisterType((*Response)(nil), "Response")
   106  }
   107  
   108  func init() {
   109  	proto.RegisterFile("go-micro/service/grpc/proto/test.proto", fileDescriptor_a22a4245ce525bcd)
   110  }
   111  
   112  var fileDescriptor_a22a4245ce525bcd = []byte{
   113  	// 142 bytes of a gzipped FileDescriptorProto
   114  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0xcf, 0xd7, 0xcd,
   115  	0xcd, 0x4c, 0x2e, 0xca, 0xd7, 0x2f, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x4f, 0x2f, 0x2a,
   116  	0x48, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x49, 0x2d, 0x2e, 0xd1, 0x03, 0x33, 0x95,
   117  	0x64, 0xb9, 0xd8, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 0x4b, 0x84, 0x84, 0xb8, 0x58, 0xf2, 0x12,
   118  	0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x25, 0x19, 0x2e, 0x8e, 0xa0,
   119  	0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x01, 0x2e, 0xe6, 0xdc, 0xe2, 0x74, 0xa8, 0x34,
   120  	0x88, 0x69, 0xa4, 0xca, 0xc5, 0x12, 0x02, 0xd2, 0x29, 0xcb, 0xc5, 0xe2, 0x9c, 0x98, 0x93, 0x23,
   121  	0xc4, 0xa1, 0x07, 0x35, 0x4b, 0x8a, 0x53, 0x0f, 0xa6, 0x4d, 0x89, 0x21, 0x89, 0x0d, 0x6c, 0x95,
   122  	0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x96, 0x1b, 0x22, 0x44, 0x94, 0x00, 0x00, 0x00,
   123  }
   124  
   125  // Reference imports to suppress errors if they are not otherwise used.
   126  var _ context.Context
   127  var _ grpc.ClientConn
   128  
   129  // This is a compile-time assertion to ensure that this generated file
   130  // is compatible with the grpc package it is being compiled against.
   131  const _ = grpc.SupportPackageIsVersion4
   132  
   133  // TestClient is the client API for Test service.
   134  //
   135  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   136  type TestClient interface {
   137  	Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
   138  }
   139  
   140  type testClient struct {
   141  	cc *grpc.ClientConn
   142  }
   143  
   144  func NewTestClient(cc *grpc.ClientConn) TestClient {
   145  	return &testClient{cc}
   146  }
   147  
   148  func (c *testClient) Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
   149  	out := new(Response)
   150  	err := c.cc.Invoke(ctx, "/Test/Call", in, out, opts...)
   151  	if err != nil {
   152  		return nil, err
   153  	}
   154  	return out, nil
   155  }
   156  
   157  // TestServer is the server API for Test service.
   158  type TestServer interface {
   159  	Call(context.Context, *Request) (*Response, error)
   160  }
   161  
   162  func RegisterTestServer(s *grpc.Server, srv TestServer) {
   163  	s.RegisterService(&_Test_serviceDesc, srv)
   164  }
   165  
   166  func _Test_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   167  	in := new(Request)
   168  	if err := dec(in); err != nil {
   169  		return nil, err
   170  	}
   171  	if interceptor == nil {
   172  		return srv.(TestServer).Call(ctx, in)
   173  	}
   174  	info := &grpc.UnaryServerInfo{
   175  		Server:     srv,
   176  		FullMethod: "/Test/Call",
   177  	}
   178  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   179  		return srv.(TestServer).Call(ctx, req.(*Request))
   180  	}
   181  	return interceptor(ctx, in, info, handler)
   182  }
   183  
   184  var _Test_serviceDesc = grpc.ServiceDesc{
   185  	ServiceName: "Test",
   186  	HandlerType: (*TestServer)(nil),
   187  	Methods: []grpc.MethodDesc{
   188  		{
   189  			MethodName: "Call",
   190  			Handler:    _Test_Call_Handler,
   191  		},
   192  	},
   193  	Streams:  []grpc.StreamDesc{},
   194  	Metadata: "go-micro/service/grpc/proto/test.proto",
   195  }