// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v5.28.3 // source: helios/compass/compass.proto package pbcompass import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( Compass_SearchPlaces_FullMethodName = "/helios.compass.Compass/SearchPlaces" Compass_GetPlaceById_FullMethodName = "/helios.compass.Compass/GetPlaceById" Compass_GetPlaceByIp_FullMethodName = "/helios.compass.Compass/GetPlaceByIp" ) // CompassClient is the client API for Compass service. // // 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. // // compass knows a lot about where we are in the world and universe we live in, how it's connected, and more. type CompassClient interface { // SearchPlaces returns a list of places based on the given query. SearchPlaces(ctx context.Context, in *SearchPlacesRequest, opts ...grpc.CallOption) (*SearchPlacesResponse, error) // GetPlaceById returns a place and it's details by its place_id which is google place id. // if it's not found, it returns an error GetPlaceById(ctx context.Context, in *GetPlaceByIdRequest, opts ...grpc.CallOption) (*GetPlaceByIdResponse, error) GetPlaceByIp(ctx context.Context, in *GetPlaceByIpRequest, opts ...grpc.CallOption) (*GetPlaceByIpResponse, error) } type compassClient struct { cc grpc.ClientConnInterface } func NewCompassClient(cc grpc.ClientConnInterface) CompassClient { return &compassClient{cc} } func (c *compassClient) SearchPlaces(ctx context.Context, in *SearchPlacesRequest, opts ...grpc.CallOption) (*SearchPlacesResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SearchPlacesResponse) err := c.cc.Invoke(ctx, Compass_SearchPlaces_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *compassClient) GetPlaceById(ctx context.Context, in *GetPlaceByIdRequest, opts ...grpc.CallOption) (*GetPlaceByIdResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlaceByIdResponse) err := c.cc.Invoke(ctx, Compass_GetPlaceById_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *compassClient) GetPlaceByIp(ctx context.Context, in *GetPlaceByIpRequest, opts ...grpc.CallOption) (*GetPlaceByIpResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetPlaceByIpResponse) err := c.cc.Invoke(ctx, Compass_GetPlaceByIp_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // CompassServer is the server API for Compass service. // All implementations must embed UnimplementedCompassServer // for forward compatibility. // // compass knows a lot about where we are in the world and universe we live in, how it's connected, and more. type CompassServer interface { // SearchPlaces returns a list of places based on the given query. SearchPlaces(context.Context, *SearchPlacesRequest) (*SearchPlacesResponse, error) // GetPlaceById returns a place and it's details by its place_id which is google place id. // if it's not found, it returns an error GetPlaceById(context.Context, *GetPlaceByIdRequest) (*GetPlaceByIdResponse, error) GetPlaceByIp(context.Context, *GetPlaceByIpRequest) (*GetPlaceByIpResponse, error) mustEmbedUnimplementedCompassServer() } // UnimplementedCompassServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedCompassServer struct{} func (UnimplementedCompassServer) SearchPlaces(context.Context, *SearchPlacesRequest) (*SearchPlacesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchPlaces not implemented") } func (UnimplementedCompassServer) GetPlaceById(context.Context, *GetPlaceByIdRequest) (*GetPlaceByIdResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPlaceById not implemented") } func (UnimplementedCompassServer) GetPlaceByIp(context.Context, *GetPlaceByIpRequest) (*GetPlaceByIpResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPlaceByIp not implemented") } func (UnimplementedCompassServer) mustEmbedUnimplementedCompassServer() {} func (UnimplementedCompassServer) testEmbeddedByValue() {} // UnsafeCompassServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to CompassServer will // result in compilation errors. type UnsafeCompassServer interface { mustEmbedUnimplementedCompassServer() } func RegisterCompassServer(s grpc.ServiceRegistrar, srv CompassServer) { // If the following call pancis, it indicates UnimplementedCompassServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&Compass_ServiceDesc, srv) } func _Compass_SearchPlaces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SearchPlacesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CompassServer).SearchPlaces(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Compass_SearchPlaces_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CompassServer).SearchPlaces(ctx, req.(*SearchPlacesRequest)) } return interceptor(ctx, in, info, handler) } func _Compass_GetPlaceById_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPlaceByIdRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CompassServer).GetPlaceById(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Compass_GetPlaceById_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CompassServer).GetPlaceById(ctx, req.(*GetPlaceByIdRequest)) } return interceptor(ctx, in, info, handler) } func _Compass_GetPlaceByIp_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetPlaceByIpRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(CompassServer).GetPlaceByIp(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Compass_GetPlaceByIp_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(CompassServer).GetPlaceByIp(ctx, req.(*GetPlaceByIpRequest)) } return interceptor(ctx, in, info, handler) } // Compass_ServiceDesc is the grpc.ServiceDesc for Compass service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Compass_ServiceDesc = grpc.ServiceDesc{ ServiceName: "helios.compass.Compass", HandlerType: (*CompassServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SearchPlaces", Handler: _Compass_SearchPlaces_Handler, }, { MethodName: "GetPlaceById", Handler: _Compass_GetPlaceById_Handler, }, { MethodName: "GetPlaceByIp", Handler: _Compass_GetPlaceByIp_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "helios/compass/compass.proto", }