remove autocomplete

This commit is contained in:
Asim Aslam
2022-02-15 15:52:06 +00:00
parent 5e7bbac8f9
commit b27e03baa1
5 changed files with 18 additions and 50 deletions

View File

@@ -1,11 +1,4 @@
{ {
"autocomplete": [{
"title": "Autocomplete queries",
"description": "Autocomplete queries for places",
"run_check": false,
"request": {},
"response": {}
}],
"nearby": [{ "nearby": [{
"title": "Find places nearby", "title": "Find places nearby",
"description": "Find places and points of interest nearby", "description": "Find places and points of interest nearby",

View File

@@ -226,7 +226,7 @@ func (*AutocompleteResponse) Descriptor() ([]byte, []int) {
return file_proto_place_proto_rawDescGZIP(), []int{2} 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 { type NearbyRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
@@ -367,6 +367,7 @@ func (x *NearbyResponse) GetResults() []*Result {
return nil return nil
} }
// Search for places by text query
type SearchRequest struct { type SearchRequest struct {
state protoimpl.MessageState state protoimpl.MessageState
sizeCache protoimpl.SizeCache 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, 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, 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, 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, 0x6c, 0x74, 0x52, 0x07, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x32, 0x79, 0x0a, 0x05, 0x50,
0x50, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x6c, 0x61, 0x63, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x12, 0x14,
0x70, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1a, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x41, 0x75, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x52, 0x65, 0x71,
0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61,
0x74, 0x1a, 0x1b, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x63, 0x6f, 0x72, 0x62, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a,
0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x06, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x12, 0x14, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e,
0x12, 0x37, 0x0a, 0x06, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x12, 0x14, 0x2e, 0x70, 0x6c, 0x61, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e,
0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
0x1a, 0x15, 0x2e, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x2e, 0x4e, 0x65, 0x61, 0x72, 0x62, 0x79, 0x52, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x0f, 0x5a, 0x0d, 0x2e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x37, 0x0a, 0x06, 0x53, 0x65, 0x61, 0x6f, 0x3b, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
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 ( var (
@@ -590,14 +586,12 @@ var file_proto_place_proto_goTypes = []interface{}{
var file_proto_place_proto_depIdxs = []int32{ var file_proto_place_proto_depIdxs = []int32{
0, // 0: place.NearbyResponse.results:type_name -> place.Result 0, // 0: place.NearbyResponse.results:type_name -> place.Result
0, // 1: place.SearchResponse.results:type_name -> place.Result 0, // 1: place.SearchResponse.results:type_name -> place.Result
1, // 2: place.Place.Autocomplete:input_type -> place.AutocompleteRequest 3, // 2: place.Place.Nearby:input_type -> place.NearbyRequest
3, // 3: place.Place.Nearby:input_type -> place.NearbyRequest 5, // 3: place.Place.Search:input_type -> place.SearchRequest
5, // 4: place.Place.Search:input_type -> place.SearchRequest 4, // 4: place.Place.Nearby:output_type -> place.NearbyResponse
2, // 5: place.Place.Autocomplete:output_type -> place.AutocompleteResponse 6, // 5: place.Place.Search:output_type -> place.SearchResponse
4, // 6: place.Place.Nearby:output_type -> place.NearbyResponse 4, // [4:6] is the sub-list for method output_type
6, // 7: place.Place.Search:output_type -> place.SearchResponse 2, // [2:4] is the sub-list for method input_type
5, // [5:8] is the sub-list for method output_type
2, // [2:5] 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 type_name
2, // [2:2] is the sub-list for extension extendee 2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name 0, // [0:2] is the sub-list for field type_name

View File

@@ -42,7 +42,6 @@ func NewPlaceEndpoints() []*api.Endpoint {
// Client API for Place service // Client API for Place service
type PlaceService interface { 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) Nearby(ctx context.Context, in *NearbyRequest, opts ...client.CallOption) (*NearbyResponse, error)
Search(ctx context.Context, in *SearchRequest, opts ...client.CallOption) (*SearchResponse, 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) { func (c *placeService) Nearby(ctx context.Context, in *NearbyRequest, opts ...client.CallOption) (*NearbyResponse, error) {
req := c.c.NewRequest(c.name, "Place.Nearby", in) req := c.c.NewRequest(c.name, "Place.Nearby", in)
out := new(NearbyResponse) out := new(NearbyResponse)
@@ -92,14 +81,12 @@ func (c *placeService) Search(ctx context.Context, in *SearchRequest, opts ...cl
// Server API for Place service // Server API for Place service
type PlaceHandler interface { type PlaceHandler interface {
Autocomplete(context.Context, *AutocompleteRequest, *AutocompleteResponse) error
Nearby(context.Context, *NearbyRequest, *NearbyResponse) error Nearby(context.Context, *NearbyRequest, *NearbyResponse) error
Search(context.Context, *SearchRequest, *SearchResponse) error Search(context.Context, *SearchRequest, *SearchResponse) error
} }
func RegisterPlaceHandler(s server.Server, hdlr PlaceHandler, opts ...server.HandlerOption) error { func RegisterPlaceHandler(s server.Server, hdlr PlaceHandler, opts ...server.HandlerOption) error {
type place interface { type place interface {
Autocomplete(ctx context.Context, in *AutocompleteRequest, out *AutocompleteResponse) error
Nearby(ctx context.Context, in *NearbyRequest, out *NearbyResponse) error Nearby(ctx context.Context, in *NearbyRequest, out *NearbyResponse) error
Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error Search(ctx context.Context, in *SearchRequest, out *SearchResponse) error
} }
@@ -114,10 +101,6 @@ type placeHandler struct {
PlaceHandler 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 { func (h *placeHandler) Nearby(ctx context.Context, in *NearbyRequest, out *NearbyResponse) error {
return h.PlaceHandler.Nearby(ctx, in, out) return h.PlaceHandler.Nearby(ctx, in, out)
} }

View File

@@ -5,7 +5,6 @@ package place;
option go_package = "./proto;place"; option go_package = "./proto;place";
service Place { service Place {
rpc Autocomplete(AutocompleteRequest) returns (AutocompleteResponse) {}
rpc Nearby(NearbyRequest) returns (NearbyResponse) {} rpc Nearby(NearbyRequest) returns (NearbyResponse) {}
rpc Search(SearchRequest) returns (SearchResponse) {} rpc Search(SearchRequest) returns (SearchResponse) {}
} }

View File

@@ -4,7 +4,6 @@
"category": "utility", "category": "utility",
"display_name": "Places", "display_name": "Places",
"pricing": { "pricing": {
"Place.Autocomplete": 5000,
"Place.Search": 20000, "Place.Search": 20000,
"Place.Nearby": 20000 "Place.Nearby": 20000
} }