github.com/litesolutions/justifay-api@v1.0.0-2.0.20220707114139-46f28a909481/proto/user/address.proto (about) 1 syntax = "proto3"; 2 3 import "google/protobuf/struct.proto"; 4 5 package user; 6 7 import "google/api/annotations.proto"; 8 import "protoc-gen-openapiv2/options/annotations.proto"; 9 //import "usergroup.proto"; 10 import "user/common.proto"; 11 12 option go_package = "github.com/resonatecoop/user-api/proto/user"; 13 14 service AddressService { 15 rpc SearchAddress(AddressQuery) returns (AddressResults); 16 } 17 18 // Based on https://community.algolia.com/places/rest.html#search-parameters 19 message AddressQuery { 20 string query = 1; 21 string type = 2; 22 int32 hits_per_page = 3; 23 // int32 page = 4; 24 } 25 26 message AddressResults { 27 repeated AddressResult hits = 1; 28 int32 nb_hits = 2; 29 } 30 31 message AddressResult { 32 string object_id = 1; 33 map<string, string> country = 2; 34 repeated string postcode = 3; 35 repeated string administrative = 4; 36 string country_code = 5; 37 map<string, float> geoloc = 6; 38 map<string, google.protobuf.ListValue> locale_names = 7; 39 map<string, google.protobuf.ListValue> city = 8; 40 }