Documentation ¶
Index ¶
- Variables
- func CleanZone(countryToClean, zoneToClean *string) (newCountry, newZone *string)
- func GetDistanceInKmBetweenCoordinates(lat1 float64, lng1 float64, lat2 float64, lng2 float64) float64
- func GetZoneDisplayName(zone string) 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 = map[string]Province{ "EC": { DisplayName: "Eastern Cape", 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", }, }, "FS": { DisplayName: "Free State", Names: []string{ "Free State", "Freestate", "Vrystaat", "iFreyistata", "Freistata", "Foreisetata", "Fureisitata", "Freyistata", "Fuleyisitata", "Freyisitata", }, }, "GP": { DisplayName: "Gauteng", Names: []string{ "GT", "Gauteng", "iGauteng", "Kgauteng", "Rhawuti", }, }, "KZN": { DisplayName: "KwaZulu-Natal", Names: []string{ "NT", "NL", "ZN", "KwaZulu-Natal", "KwaZulu Natal", "iKwaZulu-Natal", "GaZulu-Natala", "Hazolo-Natala", "KwaZulu-Natali", "HaZulu-Natal", "KwaZulu-Natala", }, }, "LP": { DisplayName: "Limpopo", Names: []string{ "NP", "Limpopo", "Vhembe", }, }, "MP": { DisplayName: "Mpumalanga", Names: []string{ "Mpumalanga", "iMpumalanga", }, }, "NC": { DisplayName: "Northern Cape", 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", }, }, "NW": { DisplayName: "North West", 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", }, }, "WC": { DisplayName: "Western Cape", 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", }, }, }
Functions ¶
func GetDistanceInKmBetweenCoordinates ¶ added in v1.111.0
func GetZoneDisplayName ¶ added in v1.107.0
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.