mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-17 13:24:56 +00:00
remove autocomplete
This commit is contained in:
@@ -42,7 +42,6 @@ func NewPlaceEndpoints() []*api.Endpoint {
|
||||
// Client API for Place service
|
||||
|
||||
type PlaceService interface {
|
||||
Autocomplete(ctx context.Context, in *AutocompleteRequest, opts ...client.CallOption) (*AutocompleteResponse, error)
|
||||
Nearby(ctx context.Context, in *NearbyRequest, opts ...client.CallOption) (*NearbyResponse, error)
|
||||
Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, error)
|
||||
}
|
||||
@@ -59,16 +58,6 @@ func NewPlaceService(name string, c client.Client) PlaceService {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *placeService) Autocomplete(ctx context.Context, in *AutocompleteRequest, opts ...client.CallOption) (*AutocompleteResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Place.Autocomplete", in)
|
||||
out := new(AutocompleteResponse)
|
||||
err := c.c.Call(ctx, req, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *placeService) Nearby(ctx context.Context, in *NearbyRequest, opts ...client.CallOption) (*NearbyResponse, error) {
|
||||
req := c.c.NewRequest(c.name, "Place.Nearby", in)
|
||||
out := new(NearbyResponse)
|
||||
@@ -92,14 +81,12 @@ func (c *placeService) Search(ctx context.Context, in *SearchRequest, opts ...cl
|
||||
// Server API for Place service
|
||||
|
||||
type PlaceHandler interface {
|
||||
Autocomplete(context.Context, *AutocompleteRequest, *AutocompleteResponse) error
|
||||
Nearby(context.Context, *NearbyRequest, *NearbyResponse) error
|
||||
Search(context.Context, *SearchRequest, *SearchResponse) error
|
||||
}
|
||||
|
||||
func RegisterPlaceHandler(s server.Server, hdlr PlaceHandler, opts ...server.HandlerOption) error {
|
||||
type place interface {
|
||||
Autocomplete(ctx context.Context, in *AutocompleteRequest, out *AutocompleteResponse) error
|
||||
Nearby(ctx context.Context, in *NearbyRequest, out *NearbyResponse) error
|
||||
Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error
|
||||
}
|
||||
@@ -114,10 +101,6 @@ type placeHandler struct {
|
||||
PlaceHandler
|
||||
}
|
||||
|
||||
func (h *placeHandler) Autocomplete(ctx context.Context, in *AutocompleteRequest, out *AutocompleteResponse) error {
|
||||
return h.PlaceHandler.Autocomplete(ctx, in, out)
|
||||
}
|
||||
|
||||
func (h *placeHandler) Nearby(ctx context.Context, in *NearbyRequest, out *NearbyResponse) error {
|
||||
return h.PlaceHandler.Nearby(ctx, in, out)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user