mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-23 07:41:25 +00:00
add address lookup service (#197)
This commit is contained in:
45
address/proto/address.proto
Normal file
45
address/proto/address.proto
Normal file
@@ -0,0 +1,45 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package address;
|
||||
|
||||
option go_package = "./proto;address";
|
||||
|
||||
service Address {
|
||||
rpc LookupPostcode(LookupPostcodeRequest) returns (LookupPostcodeResponse) {}
|
||||
}
|
||||
|
||||
message Record {
|
||||
// line one of address
|
||||
string line_one = 1;
|
||||
// line two of address
|
||||
string line_two = 2;
|
||||
// the complete address
|
||||
string summary = 3;
|
||||
// organisation if present
|
||||
string organisation = 4;
|
||||
// build name
|
||||
string building_name = 5;
|
||||
// the premise
|
||||
string premise = 6;
|
||||
// street name
|
||||
string street = 7;
|
||||
// dependent locality
|
||||
string locality = 8;
|
||||
// post town
|
||||
string town = 9;
|
||||
// the county
|
||||
string county = 10;
|
||||
// the postcode
|
||||
string postcode = 11;
|
||||
|
||||
}
|
||||
|
||||
// Lookup a list of UK addresses by postcode
|
||||
message LookupPostcodeRequest {
|
||||
// UK postcode e.g SW1A 2AA
|
||||
string postcode = 1;
|
||||
}
|
||||
|
||||
message LookupPostcodeResponse {
|
||||
repeated Record addresses = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user