Documentation ¶
Index ¶
- type CountryInfo
- type CountryInfoClient
- func (c *CountryInfoClient) MapByAlpha2(alpha2 string) *CountryInfo
- func (c *CountryInfoClient) MapByAlpha3(alpha3 string) *CountryInfo
- func (c *CountryInfoClient) MapByCallingCode(callingCode string) []*CountryInfo
- func (c *CountryInfoClient) MapByCurrency(currency string) []*CountryInfo
- func (c *CountryInfoClient) MapByName(name string) *CountryInfo
- func (c *CountryInfoClient) MapByRegion(region string) []*CountryInfo
- func (c *CountryInfoClient) MapBySubregion(subregion string) []*CountryInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CountryInfo ¶
type CountryInfo struct { Name string AlternateNames []string Alpha2 string Alpha3 string Capital string Currency []string CallingCode []string Region string Subregion string }
func (*CountryInfo) AlternateNamesLower ¶
func (c *CountryInfo) AlternateNamesLower() []string
func (*CountryInfo) CallingCodeLower ¶
func (c *CountryInfo) CallingCodeLower() []string
func (*CountryInfo) CurrencyLower ¶
func (c *CountryInfo) CurrencyLower() []string
type CountryInfoClient ¶
type CountryInfoClient struct {
Data []*CountryInfo
}
func Load ¶
func Load(specifiedURL string, remote bool) (*CountryInfoClient, error)
Pass in an optional url if you would like to use your own downloadable csv file for country's data. This is useful if you prefer to host the data file yourself or if you have modified some of the fields for your specific use case. You can now pass in location to a local repo
func (*CountryInfoClient) MapByAlpha2 ¶
func (c *CountryInfoClient) MapByAlpha2(alpha2 string) *CountryInfo
func (*CountryInfoClient) MapByAlpha3 ¶
func (c *CountryInfoClient) MapByAlpha3(alpha3 string) *CountryInfo
func (*CountryInfoClient) MapByCallingCode ¶
func (c *CountryInfoClient) MapByCallingCode(callingCode string) []*CountryInfo
func (*CountryInfoClient) MapByCurrency ¶
func (c *CountryInfoClient) MapByCurrency(currency string) []*CountryInfo
func (*CountryInfoClient) MapByName ¶
func (c *CountryInfoClient) MapByName(name string) *CountryInfo
func (*CountryInfoClient) MapByRegion ¶
func (c *CountryInfoClient) MapByRegion(region string) []*CountryInfo
func (*CountryInfoClient) MapBySubregion ¶
func (c *CountryInfoClient) MapBySubregion(subregion string) []*CountryInfo
Click to show internal directories.
Click to hide internal directories.