github.com/micro/go-micro/v2@v2.9.1/server/grpc/proto/test.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: server/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 _ "google.golang.org/genproto/googleapis/api/annotations" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 math "math" 15 ) 16 17 // Reference imports to suppress errors if they are not otherwise used. 18 var _ = proto.Marshal 19 var _ = fmt.Errorf 20 var _ = math.Inf 21 22 // This is a compile-time assertion to ensure that this generated file 23 // is compatible with the proto package it is being compiled against. 24 // A compilation error at this line likely means your copy of the 25 // proto package needs to be updated. 26 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 27 28 type Request struct { 29 Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"` 30 Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` 31 XXX_NoUnkeyedLiteral struct{} `json:"-"` 32 XXX_unrecognized []byte `json:"-"` 33 XXX_sizecache int32 `json:"-"` 34 } 35 36 func (m *Request) Reset() { *m = Request{} } 37 func (m *Request) String() string { return proto.CompactTextString(m) } 38 func (*Request) ProtoMessage() {} 39 func (*Request) Descriptor() ([]byte, []int) { 40 return fileDescriptor_bb9c685b7640cf1e, []int{0} 41 } 42 43 func (m *Request) XXX_Unmarshal(b []byte) error { 44 return xxx_messageInfo_Request.Unmarshal(m, b) 45 } 46 func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 47 return xxx_messageInfo_Request.Marshal(b, m, deterministic) 48 } 49 func (m *Request) XXX_Merge(src proto.Message) { 50 xxx_messageInfo_Request.Merge(m, src) 51 } 52 func (m *Request) XXX_Size() int { 53 return xxx_messageInfo_Request.Size(m) 54 } 55 func (m *Request) XXX_DiscardUnknown() { 56 xxx_messageInfo_Request.DiscardUnknown(m) 57 } 58 59 var xxx_messageInfo_Request proto.InternalMessageInfo 60 61 func (m *Request) GetUuid() string { 62 if m != nil { 63 return m.Uuid 64 } 65 return "" 66 } 67 68 func (m *Request) GetName() string { 69 if m != nil { 70 return m.Name 71 } 72 return "" 73 } 74 75 type Response struct { 76 Msg string `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` 77 XXX_NoUnkeyedLiteral struct{} `json:"-"` 78 XXX_unrecognized []byte `json:"-"` 79 XXX_sizecache int32 `json:"-"` 80 } 81 82 func (m *Response) Reset() { *m = Response{} } 83 func (m *Response) String() string { return proto.CompactTextString(m) } 84 func (*Response) ProtoMessage() {} 85 func (*Response) Descriptor() ([]byte, []int) { 86 return fileDescriptor_bb9c685b7640cf1e, []int{1} 87 } 88 89 func (m *Response) XXX_Unmarshal(b []byte) error { 90 return xxx_messageInfo_Response.Unmarshal(m, b) 91 } 92 func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 93 return xxx_messageInfo_Response.Marshal(b, m, deterministic) 94 } 95 func (m *Response) XXX_Merge(src proto.Message) { 96 xxx_messageInfo_Response.Merge(m, src) 97 } 98 func (m *Response) XXX_Size() int { 99 return xxx_messageInfo_Response.Size(m) 100 } 101 func (m *Response) XXX_DiscardUnknown() { 102 xxx_messageInfo_Response.DiscardUnknown(m) 103 } 104 105 var xxx_messageInfo_Response proto.InternalMessageInfo 106 107 func (m *Response) GetMsg() string { 108 if m != nil { 109 return m.Msg 110 } 111 return "" 112 } 113 114 func init() { 115 proto.RegisterType((*Request)(nil), "Request") 116 proto.RegisterType((*Response)(nil), "Response") 117 } 118 119 func init() { proto.RegisterFile("server/grpc/proto/test.proto", fileDescriptor_bb9c685b7640cf1e) } 120 121 var fileDescriptor_bb9c685b7640cf1e = []byte{ 122 // 261 bytes of a gzipped FileDescriptorProto 123 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x29, 0x4e, 0x2d, 0x2a, 124 0x4b, 0x2d, 0xd2, 0x4f, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x2f, 0x49, 125 0x2d, 0x2e, 0xd1, 0x03, 0x33, 0xa5, 0x64, 0xd2, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0x13, 0x0b, 126 0x32, 0xf5, 0x13, 0xf3, 0xf2, 0xf2, 0x4b, 0x12, 0x4b, 0x32, 0xf3, 0xf3, 0x8a, 0x21, 0xb2, 0x4a, 127 0x86, 0x5c, 0xec, 0x41, 0xa9, 0x85, 0xa5, 0xa9, 0xc5, 0x25, 0x42, 0x42, 0x5c, 0x2c, 0xa5, 0xa5, 128 0x99, 0x29, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x60, 0x36, 0x48, 0x2c, 0x2f, 0x31, 0x37, 129 0x55, 0x82, 0x09, 0x22, 0x06, 0x62, 0x2b, 0xc9, 0x70, 0x71, 0x04, 0xa5, 0x16, 0x17, 0xe4, 0xe7, 130 0x15, 0xa7, 0x0a, 0x09, 0x70, 0x31, 0xe7, 0x16, 0xa7, 0x43, 0xb5, 0x80, 0x98, 0x46, 0xcf, 0x18, 131 0xb9, 0x58, 0x42, 0x40, 0xc6, 0x39, 0x70, 0xb1, 0x38, 0x27, 0xe6, 0xe4, 0x08, 0x71, 0xe8, 0x41, 132 0x2d, 0x90, 0xe2, 0xd4, 0x83, 0xe9, 0x53, 0x52, 0x6e, 0xba, 0xfc, 0x64, 0x32, 0x93, 0xac, 0x92, 133 0x04, 0xd8, 0x59, 0x65, 0x06, 0x60, 0x07, 0xeb, 0x27, 0x27, 0xe6, 0xe4, 0xe8, 0x57, 0x83, 0x2c, 134 0xae, 0xb5, 0x62, 0xd4, 0x12, 0x72, 0xe3, 0xe2, 0x00, 0x99, 0x10, 0x90, 0x5c, 0x94, 0x8a, 0xdd, 135 0x14, 0x55, 0xb0, 0x29, 0xf2, 0x4a, 0x52, 0x71, 0x98, 0xc6, 0x14, 0x24, 0x17, 0xa5, 0xea, 0xdb, 136 0xab, 0x80, 0xcc, 0x09, 0xe1, 0xe2, 0x87, 0x99, 0xe3, 0x99, 0x57, 0x96, 0x98, 0x93, 0x99, 0x82, 137 0xdd, 0x38, 0x1d, 0xb0, 0x71, 0x6a, 0x4a, 0x8a, 0xb8, 0x8c, 0xcb, 0x84, 0xe8, 0xd6, 0xb7, 0xb7, 138 0x62, 0xd4, 0x4a, 0x62, 0x03, 0x07, 0xa0, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x32, 0x18, 139 0x0f, 0x7e, 0x01, 0x00, 0x00, 140 } 141 142 // Reference imports to suppress errors if they are not otherwise used. 143 var _ context.Context 144 var _ grpc.ClientConn 145 146 // This is a compile-time assertion to ensure that this generated file 147 // is compatible with the grpc package it is being compiled against. 148 const _ = grpc.SupportPackageIsVersion4 149 150 // TestClient is the client API for Test service. 151 // 152 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 153 type TestClient interface { 154 Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) 155 CallPcre(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) 156 CallPcreInvalid(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) 157 } 158 159 type testClient struct { 160 cc *grpc.ClientConn 161 } 162 163 func NewTestClient(cc *grpc.ClientConn) TestClient { 164 return &testClient{cc} 165 } 166 167 func (c *testClient) Call(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { 168 out := new(Response) 169 err := c.cc.Invoke(ctx, "/Test/Call", in, out, opts...) 170 if err != nil { 171 return nil, err 172 } 173 return out, nil 174 } 175 176 func (c *testClient) CallPcre(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { 177 out := new(Response) 178 err := c.cc.Invoke(ctx, "/Test/CallPcre", in, out, opts...) 179 if err != nil { 180 return nil, err 181 } 182 return out, nil 183 } 184 185 func (c *testClient) CallPcreInvalid(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) { 186 out := new(Response) 187 err := c.cc.Invoke(ctx, "/Test/CallPcreInvalid", in, out, opts...) 188 if err != nil { 189 return nil, err 190 } 191 return out, nil 192 } 193 194 // TestServer is the server API for Test service. 195 type TestServer interface { 196 Call(context.Context, *Request) (*Response, error) 197 CallPcre(context.Context, *Request) (*Response, error) 198 CallPcreInvalid(context.Context, *Request) (*Response, error) 199 } 200 201 // UnimplementedTestServer can be embedded to have forward compatible implementations. 202 type UnimplementedTestServer struct { 203 } 204 205 func (*UnimplementedTestServer) Call(ctx context.Context, req *Request) (*Response, error) { 206 return nil, status.Errorf(codes.Unimplemented, "method Call not implemented") 207 } 208 func (*UnimplementedTestServer) CallPcre(ctx context.Context, req *Request) (*Response, error) { 209 return nil, status.Errorf(codes.Unimplemented, "method CallPcre not implemented") 210 } 211 func (*UnimplementedTestServer) CallPcreInvalid(ctx context.Context, req *Request) (*Response, error) { 212 return nil, status.Errorf(codes.Unimplemented, "method CallPcreInvalid not implemented") 213 } 214 215 func RegisterTestServer(s *grpc.Server, srv TestServer) { 216 s.RegisterService(&_Test_serviceDesc, srv) 217 } 218 219 func _Test_Call_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 220 in := new(Request) 221 if err := dec(in); err != nil { 222 return nil, err 223 } 224 if interceptor == nil { 225 return srv.(TestServer).Call(ctx, in) 226 } 227 info := &grpc.UnaryServerInfo{ 228 Server: srv, 229 FullMethod: "/Test/Call", 230 } 231 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 232 return srv.(TestServer).Call(ctx, req.(*Request)) 233 } 234 return interceptor(ctx, in, info, handler) 235 } 236 237 func _Test_CallPcre_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 238 in := new(Request) 239 if err := dec(in); err != nil { 240 return nil, err 241 } 242 if interceptor == nil { 243 return srv.(TestServer).CallPcre(ctx, in) 244 } 245 info := &grpc.UnaryServerInfo{ 246 Server: srv, 247 FullMethod: "/Test/CallPcre", 248 } 249 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 250 return srv.(TestServer).CallPcre(ctx, req.(*Request)) 251 } 252 return interceptor(ctx, in, info, handler) 253 } 254 255 func _Test_CallPcreInvalid_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 256 in := new(Request) 257 if err := dec(in); err != nil { 258 return nil, err 259 } 260 if interceptor == nil { 261 return srv.(TestServer).CallPcreInvalid(ctx, in) 262 } 263 info := &grpc.UnaryServerInfo{ 264 Server: srv, 265 FullMethod: "/Test/CallPcreInvalid", 266 } 267 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 268 return srv.(TestServer).CallPcreInvalid(ctx, req.(*Request)) 269 } 270 return interceptor(ctx, in, info, handler) 271 } 272 273 var _Test_serviceDesc = grpc.ServiceDesc{ 274 ServiceName: "Test", 275 HandlerType: (*TestServer)(nil), 276 Methods: []grpc.MethodDesc{ 277 { 278 MethodName: "Call", 279 Handler: _Test_Call_Handler, 280 }, 281 { 282 MethodName: "CallPcre", 283 Handler: _Test_CallPcre_Handler, 284 }, 285 { 286 MethodName: "CallPcreInvalid", 287 Handler: _Test_CallPcreInvalid_Handler, 288 }, 289 }, 290 Streams: []grpc.StreamDesc{}, 291 Metadata: "server/grpc/proto/test.proto", 292 }