From b27e03baa1e8769a7c874f2ea8e6ee34ea75fc99 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Tue, 15 Feb 2022 15:52:06 +0000 Subject: [PATCH] remove autocomplete --- place/examples.json | 7 ------ place/proto/place.pb.go | 42 +++++++++++++++-------------------- place/proto/place.pb.micro.go | 17 -------------- place/proto/place.proto | 1 - place/publicapi.json | 1 - 5 files changed, 18 insertions(+), 50 deletions(-) diff --git a/place/examples.json b/place/examples.json index 61f58ff..4dfc890 100644 --- a/place/examples.json +++ b/place/examples.json @@ -1,11 +1,4 @@ { - "autocomplete": [{ - "title": "Autocomplete queries", - "description": "Autocomplete queries for places", - "run_check": false, - "request": {}, - "response": {} - }], "nearby": [{ "title": "Find places nearby", "description": "Find places and points of interest nearby", diff --git a/place/proto/place.pb.go b/place/proto/place.pb.go index f23565e..7b4309f 100644 --- a/place/proto/place.pb.go +++ b/place/proto/place.pb.go @@ -226,7 +226,7 @@ func (*AutocompleteResponse) Descriptor() ([]byte, []int) { return file_proto_place_proto_rawDescGZIP(), []int{2} } -// Search for places nearby, points of interest and geographic locations +// Find places nearby using a location type NearbyRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -367,6 +367,7 @@ func (x *NearbyResponse) GetResults() []*Result { return nil } +// Search for places by text query type SearchRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -548,21 +549,16 @@ var file_proto_place_proto_rawDesc = []byte{ 0x22, 0x39, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x32, 0xc4, 0x01, 0x0a, 0x05, - 0x50, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, - 0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x41, 0x75, - 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x37, 0x0a, 0x06, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x12, 0x14, 0x2e, 0x70, 0x6c, 0x61, - 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x15, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x06, 0x53, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x12, 0x14, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, - 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6c, 0x61, 0x63, - 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x70, 0x6c, - 0x61, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x32, 0x79, 0x0a, 0x05, 0x50, + 0x6c, 0x61, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x12, 0x14, + 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61, + 0x72, 0x62, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, + 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, + 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, + 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x3b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -590,14 +586,12 @@ var file_proto_place_proto_goTypes = []interface{}{ var file_proto_place_proto_depIdxs = []int32{ 0, // 0: place.NearbyResponse.results:type_name -> place.Result 0, // 1: place.SearchResponse.results:type_name -> place.Result - 1, // 2: place.Place.Autocomplete:input_type -> place.AutocompleteRequest - 3, // 3: place.Place.Nearby:input_type -> place.NearbyRequest - 5, // 4: place.Place.Search:input_type -> place.SearchRequest - 2, // 5: place.Place.Autocomplete:output_type -> place.AutocompleteResponse - 4, // 6: place.Place.Nearby:output_type -> place.NearbyResponse - 6, // 7: place.Place.Search:output_type -> place.SearchResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type + 3, // 2: place.Place.Nearby:input_type -> place.NearbyRequest + 5, // 3: place.Place.Search:input_type -> place.SearchRequest + 4, // 4: place.Place.Nearby:output_type -> place.NearbyResponse + 6, // 5: place.Place.Search:output_type -> place.SearchResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] is the sub-list for method input_type 2, // [2:2] is the sub-list for extension type_name 2, // [2:2] is the sub-list for extension extendee 0, // [0:2] is the sub-list for field type_name diff --git a/place/proto/place.pb.micro.go b/place/proto/place.pb.micro.go index cc8c10e..17b3db4 100644 --- a/place/proto/place.pb.micro.go +++ b/place/proto/place.pb.micro.go @@ -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) } diff --git a/place/proto/place.proto b/place/proto/place.proto index 8d074e4..38e5ae4 100644 --- a/place/proto/place.proto +++ b/place/proto/place.proto @@ -5,7 +5,6 @@ package place; option go_package = "./proto;place"; service Place { - rpc Autocomplete(AutocompleteRequest) returns (AutocompleteResponse) {} rpc Nearby(NearbyRequest) returns (NearbyResponse) {} rpc Search(SearchRequest) returns (SearchResponse) {} } diff --git a/place/publicapi.json b/place/publicapi.json index 83164c6..b638a09 100644 --- a/place/publicapi.json +++ b/place/publicapi.json @@ -4,7 +4,6 @@ "category": "utility", "display_name": "Places", "pricing": { - "Place.Autocomplete": 5000, "Place.Search": 20000, "Place.Nearby": 20000 }