github.com/litesolutions/justifay-api@v1.0.0-2.0.20220707114139-46f28a909481/proto/user/address_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 3 package user 4 5 import ( 6 context "context" 7 grpc "google.golang.org/grpc" 8 codes "google.golang.org/grpc/codes" 9 status "google.golang.org/grpc/status" 10 ) 11 12 // This is a compile-time assertion to ensure that this generated file 13 // is compatible with the grpc package it is being compiled against. 14 const _ = grpc.SupportPackageIsVersion7 15 16 // AddressServiceClient is the client API for AddressService service. 17 // 18 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 19 type AddressServiceClient interface { 20 SearchAddress(ctx context.Context, in *AddressQuery, opts ...grpc.CallOption) (*AddressResults, error) 21 } 22 23 type addressServiceClient struct { 24 cc grpc.ClientConnInterface 25 } 26 27 func NewAddressServiceClient(cc grpc.ClientConnInterface) AddressServiceClient { 28 return &addressServiceClient{cc} 29 } 30 31 func (c *addressServiceClient) SearchAddress(ctx context.Context, in *AddressQuery, opts ...grpc.CallOption) (*AddressResults, error) { 32 out := new(AddressResults) 33 err := c.cc.Invoke(ctx, "/user.AddressService/SearchAddress", in, out, opts...) 34 if err != nil { 35 return nil, err 36 } 37 return out, nil 38 } 39 40 // AddressServiceServer is the server API for AddressService service. 41 // All implementations should embed UnimplementedAddressServiceServer 42 // for forward compatibility 43 type AddressServiceServer interface { 44 SearchAddress(context.Context, *AddressQuery) (*AddressResults, error) 45 } 46 47 // UnimplementedAddressServiceServer should be embedded to have forward compatible implementations. 48 type UnimplementedAddressServiceServer struct { 49 } 50 51 func (UnimplementedAddressServiceServer) SearchAddress(context.Context, *AddressQuery) (*AddressResults, error) { 52 return nil, status.Errorf(codes.Unimplemented, "method SearchAddress not implemented") 53 } 54 55 // UnsafeAddressServiceServer may be embedded to opt out of forward compatibility for this service. 56 // Use of this interface is not recommended, as added methods to AddressServiceServer will 57 // result in compilation errors. 58 type UnsafeAddressServiceServer interface { 59 mustEmbedUnimplementedAddressServiceServer() 60 } 61 62 func RegisterAddressServiceServer(s grpc.ServiceRegistrar, srv AddressServiceServer) { 63 s.RegisterService(&_AddressService_serviceDesc, srv) 64 } 65 66 func _AddressService_SearchAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 67 in := new(AddressQuery) 68 if err := dec(in); err != nil { 69 return nil, err 70 } 71 if interceptor == nil { 72 return srv.(AddressServiceServer).SearchAddress(ctx, in) 73 } 74 info := &grpc.UnaryServerInfo{ 75 Server: srv, 76 FullMethod: "/user.AddressService/SearchAddress", 77 } 78 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 79 return srv.(AddressServiceServer).SearchAddress(ctx, req.(*AddressQuery)) 80 } 81 return interceptor(ctx, in, info, handler) 82 } 83 84 var _AddressService_serviceDesc = grpc.ServiceDesc{ 85 ServiceName: "user.AddressService", 86 HandlerType: (*AddressServiceServer)(nil), 87 Methods: []grpc.MethodDesc{ 88 { 89 MethodName: "SearchAddress", 90 Handler: _AddressService_SearchAddress_Handler, 91 }, 92 }, 93 Streams: []grpc.StreamDesc{}, 94 Metadata: "user/address.proto", 95 }