Documentation ¶
Index ¶
- Variables
- func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string)
- func IsProvince(address string) bool
- func MD5HashOfAddress(enteredAddress string, lat *float64, lng *float64, addressType *string) string
- func MD5HashOfLowerCaseEnteredAddress(enteredAddress string) string
- type Province
Constants ¶
This section is empty.
Variables ¶
View Source
var Provinces = []Province{ { Code: "EC", Names: []string{ "Eastern Cape", "Eastern-Cape", "Oos-Kaap", "iPumalanga-Kapa", "Kapa Bohlabela", "Kapa Botjhabela", "Kapa-Vuxa", "Kapa Botlhaba", "Kapa Vhubvaḓuvha", "Mpuma-Koloni", "Mpumalanga-Kapa", "Mpumalanga-Koloni", }, }, { Code: "FS", Names: []string{ "Free State", "Freestate", "Vrystaat", "iFreyistata", "Freistata", "Foreisetata", "Fureisitata", "Freyistata", "Fuleyisitata", "Freyisitata", }, }, { Code: "GP", Names: []string{ "Gauteng", "iGauteng", "Kgauteng", "Rhawuti", }, }, { Code: "KZN", Names: []string{ "KwaZulu-Natal", "KwaZulu Natal", "iKwaZulu-Natal", "GaZulu-Natala", "Hazolo-Natala", "KwaZulu-Natali", "HaZulu-Natal", "KwaZulu-Natala", }, }, { Code: "LP", Names: []string{ "Limpopo", "Vhembe", }, }, { Code: "MP", Names: []string{ "Mpumalanga", "iMpumalanga", }, }, { Code: "NC", Names: []string{ "Northern Cape", "Northern-Cape", "Noord-Kaap", "Noord Kaap", "iTlhagwini-Kapa", "Kapa Leboya", "Kapa-N'walungu", "Kapa Bokone", "Kapa Leboa", "Kapa Devhula", "Mntla-Koloni", "Nyakatho-Kapa", "Nyakatho-Koloni", }, }, { Code: "NW", Names: []string{ "North West", "North-West", "Noordwes", "Noord-wes", "iTlhagwini-Tjhingalanga", "Lebowa Bodikela", "Leboya Bophirima", "Leboya le Bophirima", "N'walungu-Vupeladyambu", "Bokone Bophirima", "Mntla-Ntshona", "Nyakatho-Ntshonalanga", }, }, { Code: "WC", Names: []string{ "Western Cape", "Western-Cape", "Wes-Kaap", "Wes Kaap", "iTjhingalanga-Kapa", "Kapa Bodikela", "Kapa Bophirimela", "Kapa-Vupeladyambu", "Kapa Bophirima", "Kapa Vhukovhela", "Ntshona-Koloni", "Ntshonalanga-Kapa", "Ntshonalanga-Koloni", }, }, }
Provinces largely follows the ISO standard: https://en.wikipedia.org/wiki/ISO_3166-2:ZA
Functions ¶
func IsProvince ¶
func MD5HashOfAddress ¶
func MD5HashOfAddress(enteredAddress string, lat *float64, lng *float64, addressType *string) string
MD5HashOfAddress m(E,L,L) - calculates and returns the MD5 hash of the entered address, lat and lng concatenated together. If lat and lng is blank, it is only the hash of the entered address
func MD5HashOfLowerCaseEnteredAddress ¶
MD5HashOfLowerCaseEnteredAddress m(e) - calculates and returns the MD5 hash of a string after preparing the string properly.
Types ¶
Click to show internal directories.
Click to hide internal directories.