github.com/Augustu/go-micro/v2@v2.9.3/service/grpc/proto/test.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: 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 codes "google.golang.org/grpc/codes" 12 status "google.golang.org/grpc/status" 13 math "math" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 26 27 type Request struct { 28 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 29 XXX_NoUnkeyedLiteral struct{} `json:"-"` 30 XXX_unrecognized []byte `json:"-"` 31 XXX_sizecache int32 `json:"-"` 32 } 33 34 func (m *Request) Reset() { *m = Request{} } 35 func (m *Request) String() string { return proto.CompactTextString(m) } 36 func (*Request) ProtoMessage() {} 37 func (*Request) Descriptor() ([]byte, []int) { 38 return fileDescriptor_06b01994cb662112, []int{0} 39 } 40 41 func (m *Request) XXX_Unmarshal(b []byte) error { 42 return xxx_messageInfo_Request.Unmarshal(m, b) 43 } 44 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 45 return xxx_messageInfo_Request.Marshal(b, m, deterministic) 46 } 47 func (m *Request) XXX_Merge(src proto.Message) { 48 xxx_messageInfo_Request.Merge(m, src) 49 } 50 func (m *Request) XXX_Size() int { 51 return xxx_messageInfo_Request.Size(m) 52 } 53 func (m *Request) XXX_DiscardUnknown() { 54 xxx_messageInfo_Request.DiscardUnknown(m) 55 } 56 57 var xxx_messageInfo_Request proto.InternalMessageInfo 58 59 func (m *Request) GetName() string { 60 if m != nil { 61 return m.Name 62 } 63 return "" 64 } 65 66 type Response struct { 67 Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` 68 XXX_NoUnkeyedLiteral struct{} `json:"-"` 69 XXX_unrecognized []byte `json:"-"` 70 XXX_sizecache int32 `json:"-"` 71 } 72 73 func (m *Response) Reset() { *m = Response{} } 74 func (m *Response) String() string { return proto.CompactTextString(m) } 75 func (*Response) ProtoMessage() {} 76 func (*Response) Descriptor() ([]byte, []int) { 77 return fileDescriptor_06b01994cb662112, []int{1} 78 } 79 80 func (m *Response) XXX_Unmarshal(b []byte) error { 81 return xxx_messageInfo_Response.Unmarshal(m, b) 82 } 83 func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 84 return xxx_messageInfo_Response.Marshal(b, m, deterministic) 85 } 86 func (m *Response) XXX_Merge(src proto.Message) { 87 xxx_messageInfo_Response.Merge(m, src) 88 } 89 func (m *Response) XXX_Size() int { 90 return xxx_messageInfo_Response.Size(m) 91 } 92 func (m *Response) XXX_DiscardUnknown() { 93 xxx_messageInfo_Response.DiscardUnknown(m) 94 } 95 96 var xxx_messageInfo_Response proto.InternalMessageInfo 97 98 func (m *Response) GetMsg() string { 99 if m != nil { 100 return m.Msg 101 } 102 return "" 103 } 104 105 func init() { 106 proto.RegisterType((*Request)(nil), "Request") 107 proto.RegisterType((*Response)(nil), "Response") 108 } 109 110 func init() { proto.RegisterFile("service/grpc/proto/test.proto", fileDescriptor_06b01994cb662112) } 111 112 var fileDescriptor_06b01994cb662112 = []byte{ 113 // 133 bytes of a gzipped FileDescriptorProto 114 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2d, 0x4e, 0x2d, 0x2a, 115 0xcb, 0x4c, 0x4e, 0xd5, 0x4f, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 116 0x49, 0x2d, 0x2e, 0xd1, 0x03, 0x33, 0x95, 0x64, 0xb9, 0xd8, 0x83, 0x52, 0x0b, 0x4b, 0x53, 0x8b, 117 0x4b, 0x84, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 118 0xc0, 0x6c, 0x25, 0x19, 0x2e, 0x8e, 0xa0, 0xd4, 0xe2, 0x82, 0xfc, 0xbc, 0xe2, 0x54, 0x21, 0x01, 119 0x2e, 0xe6, 0xdc, 0xe2, 0x74, 0xa8, 0x34, 0x88, 0x69, 0xa4, 0xca, 0xc5, 0x12, 0x02, 0xd2, 0x29, 120 0xcb, 0xc5, 0xe2, 0x9c, 0x98, 0x93, 0x23, 0xc4, 0xa1, 0x07, 0x35, 0x4b, 0x8a, 0x53, 0x0f, 0xa6, 121 0x4d, 0x89, 0x21, 0x89, 0x0d, 0x6c, 0x95, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xe6, 0x7f, 0x80, 122 0xd4, 0x8b, 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 // UnimplementedTestServer can be embedded to have forward compatible implementations. 163 type UnimplementedTestServer struct { 164 } 165 166 func (*UnimplementedTestServer) Call(ctx context.Context, req *Request) (*Response, error) { 167 return nil, status.Errorf(codes.Unimplemented, "method Call not implemented") 168 } 169 170 func RegisterTestServer(s *grpc.Server, srv TestServer) { 171 s.RegisterService(&_Test_serviceDesc, srv) 172 } 173 174 func _Test_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 175 in := new(Request) 176 if err := dec(in); err != nil { 177 return nil, err 178 } 179 if interceptor == nil { 180 return srv.(TestServer).Call(ctx, in) 181 } 182 info := &grpc.UnaryServerInfo{ 183 Server: srv, 184 FullMethod: "/Test/Call", 185 } 186 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 187 return srv.(TestServer).Call(ctx, req.(*Request)) 188 } 189 return interceptor(ctx, in, info, handler) 190 } 191 192 var _Test_serviceDesc = grpc.ServiceDesc{ 193 ServiceName: "Test", 194 HandlerType: (*TestServer)(nil), 195 Methods: []grpc.MethodDesc{ 196 { 197 MethodName: "Call", 198 Handler: _Test_Call_Handler, 199 }, 200 }, 201 Streams: []grpc.StreamDesc{}, 202 Metadata: "service/grpc/proto/test.proto", 203 }