cleanse

package
v0.0.0-...-62dd230 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cleanse

func Cleanse()

func LoadCurrencyLocales

func LoadCurrencyLocales() map[string]string

func LoadCurrencySymbols

func LoadCurrencySymbols() map[string]CurrencySymbols

func LoadLocaleOverrides

func LoadLocaleOverrides() []common.Locale

For some reason, some countries are missing from the underlying CLDR "Numbers" data that we ingest. It's easier to add this manual override than figure out how to fix the source data.

Types

type Carrier

type Carrier struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	TrackingUrl string `json:"tracking_url"`
}

func LoadCarriers

func LoadCarriers() []Carrier

type CarrierService

type CarrierService struct {
	Id        string `json:"id"`
	Name      string `json:"name"`
	CarrierId string `json:"carrier_id"`
}

func LoadCarrierServices

func LoadCarrierServices() []CarrierService

type CldrCurrencies

type CldrCurrencies struct {
	Main map[string]CldrCurrenciesMain `json:"main"`
}

type CldrCurrenciesMain

type CldrCurrenciesMain struct {
	Identity CldrIdentity          `json:"identity"`
	Numbers  CldrCurrenciesNumbers `json:"numbers"`
}

type CldrCurrenciesNumbers

type CldrCurrenciesNumbers struct {
	Currencies map[string]CldrIncomingCurrency `json:"currencies"`
}

type CldrCurrency

type CldrCurrency struct {
	Iso_4217_3 string          `json:"iso_4217_3"`
	Symbols    CurrencySymbols `json:"symbols"`
}

type CldrIdentity

type CldrIdentity struct {
	Language  string `json:"language"`
	Territory string `json:"territory"`
}

type CldrIncomingCurrency

type CldrIncomingCurrency struct {
	Name            string `json:"displayName"`
	NameCountOne    string `json:"displayName-count-one"`
	NameCountOther  string `json:"displayName-count-other"`
	Symbol          string `json:"symbol,omitempty"`
	SymbolAltNarrow string `json:"symbol-alt-narrow,omitempty"`
}

type Continent

type Continent struct {
	Code2 string `json:"code2"`
	Code3 string `json:"code3"`
	Name  string `json:"name"`
}

func LoadContinents

func LoadContinents() []Continent

type Country

type Country struct {
	Name       string `json:"name"`
	Continent  string `json:"continent"`
	Iso_3166_2 string `json:"iso_3166_2"`
	Iso_3166_3 string `json:"iso_3166_3"`
	Currency   string `json:"currency"`
}

func LoadCountries

func LoadCountries() []Country

type CountryContinent

type CountryContinent struct {
	ContinentCode string `json:"continent"`
	CountryCode   string `json:"country"`
}

func LoadCountryContinents

func LoadCountryContinents() []CountryContinent

type CountryDefaultLanguage

type CountryDefaultLanguage struct {
	LanguageCode string `json:"language"`
	CountryCode  string `json:"country"`
}

func LoadCountryDefaultLanguages

func LoadCountryDefaultLanguages() []CountryDefaultLanguage

type CountryDuty

type CountryDuty struct {
	CountryCode   string `json:"country"`
	DeliveredDuty string `json:"duty"`
}

func LoadCountryDuties

func LoadCountryDuties() []CountryDuty

type CountryTimezone

type CountryTimezone struct {
	TimezoneCode string `json:"timezone"`
	CountryCode  string `json:"country"`
}

func LoadCountryTimezones

func LoadCountryTimezones() []CountryTimezone

type Currency

type Currency struct {
	Name           string `json:"name"`
	Iso_4217_3     string `json:"iso_4217_3"`
	NumberDecimals int    `json:"number_decimals"`
}

func LoadCurrencies

func LoadCurrencies() []Currency

type CurrencyLocale

type CurrencyLocale struct {
	CurrencyCode string `json:"currency"`
	LocaleId     string `json:"locale"`
}

type CurrencySymbols

type CurrencySymbols struct {
	Primary string `json:"primary"`
	Narrow  string `json:"narrow,omitempty"`
}

type IncomingCurrency

type IncomingCurrency struct {
	Name           string `json:"name"`
	Iso_4217_3     string `json:"iso_4217_3"`
	NumberDecimals int    `json:"number_decimals"`
}

type IncomingLanguage

type IncomingLanguage struct {
	Iso_639_2 string                   `json:"iso639_1"`
	Names     []string                 `json:"name"`
	Countries []string                 `json:"countries"`
	Locales   []IncomingLanguageLocale `json:"langCultureMs"`
}

type IncomingLanguageLocale

type IncomingLanguageLocale struct {
	Id   string `json:"langCultureName"`
	Name string `json:"displayName"`
}

type IncomingLanguages

type IncomingLanguages struct {
	LanguageFamilies []string           `json:"languageFamilies"`
	Languages        []IncomingLanguage `json:"languages"`
}

type IncomingNumbers

type IncomingNumbers struct {
	Main map[string]IncomingNumbersMain `json:"main"`
}

type IncomingNumbersMain

type IncomingNumbersMain struct {
	Identity CldrIdentity           `json:"identity"`
	Numbers  IncomingNumbersNumbers `json:"numbers"`
}

type IncomingNumbersNumbers

type IncomingNumbersNumbers struct {
	Symbols IncomingNumbersSymbols `json:"symbols-numberSystem-latn"`
}

type IncomingNumbersSymbols

type IncomingNumbersSymbols struct {
	Decimal string `json:"decimal"`
	Group   string `json:"group"`
}

type Language

type Language struct {
	Name      string   `json:"name"`
	Iso_639_2 string   `json:"iso_639_2"`
	Countries []string `json:"countries"`
	Locales   []string `json:"locales"`
}

func LoadLanguages

func LoadLanguages() []Language

type LocaleName

type LocaleName struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

func LoadLocaleNames

func LoadLocaleNames() []LocaleName

type Number

type Number struct {
	Country    string     `json:"country"`
	Language   string     `json:"language"`
	Separators Separators `json:"separators"`
}

func LoadNumbers

func LoadNumbers() []Number

type PaymentMethod

type PaymentMethod struct {
	Id           string   `json:"id"`
	Type         string   `json:"type"`
	Name         string   `json:"name"`
	SmallWidth   int      `json:"small_width"`
	SmallHeight  int      `json:"small_height"`
	MediumWidth  int      `json:"medium_width"`
	MediumHeight int      `json:"medium_height"`
	LargeWidth   int      `json:"large_width"`
	LargeHeight  int      `json:"large_height"`
	Regions      []string `json:"regions"`
	Capabilities []string `json:"capabilities"`
}

func LoadPaymentMethods

func LoadPaymentMethods() []PaymentMethod

type Province

type Province struct {
	Iso_3166_2   string `json:"iso_3166_2"`
	Name         string `json:"name"`
	CountryCode  string `json:"country"`
	ProvinceType string `json:"province_type"`
}

func LoadProvinces

func LoadProvinces() []Province

type ProvinceTranslation

type ProvinceTranslation struct {
	LocaleId    string `json:"locale_id"`
	ProvinceId  string `json:"province_id"`
	Translation string `json:"translation"`
}

func LoadProvinceTranslations

func LoadProvinceTranslations() []ProvinceTranslation

type Separators

type Separators struct {
	Decimal string `json:"decimal"`
	Group   string `json:"group"`
}

type Timezone

type Timezone struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Offset      int    `json:"offset"`
}

func LoadTimezones

func LoadTimezones() []Timezone

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL