tables

package
v1.5.2 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Alnum = make(map[string]*regexp.Regexp)
View Source
var Alpha = make(map[string]*regexp.Regexp)
View Source
var Decimal = make(map[string]rune)
View Source
var HashAlgoLen = map[string]int{
	"md5":       32,
	"md4":       32,
	"sha1":      40,
	"sha256":    64,
	"sha384":    96,
	"sha512":    128,
	"ripemd128": 32,
	"ripemd160": 40,
	"tiger128":  32,
	"tiger160":  40,
	"tiger192":  48,
	"crc32":     8,
	"crc32b":    8,
}
View Source
var IBANRegexp = map[string]*regexp.Regexp{
	"AD": regexp.MustCompile(`^(?:AD[0-9]{2})\d{8}[A-Z0-9]{12}$`),
	"AE": regexp.MustCompile(`^(?:AE[0-9]{2})\d{3}\d{16}$`),
	"AL": regexp.MustCompile(`^(?:AL[0-9]{2})\d{8}[A-Z0-9]{16}$`),
	"AT": regexp.MustCompile(`^(?:AT[0-9]{2})\d{16}$`),
	"AZ": regexp.MustCompile(`^(?:AZ[0-9]{2})[A-Z0-9]{4}\d{20}$`),
	"BA": regexp.MustCompile(`^(?:BA[0-9]{2})\d{16}$`),
	"BE": regexp.MustCompile(`^(?:BE[0-9]{2})\d{12}$`),
	"BG": regexp.MustCompile(`^(?:BG[0-9]{2})[A-Z]{4}\d{6}[A-Z0-9]{8}$`),
	"BH": regexp.MustCompile(`^(?:BH[0-9]{2})[A-Z]{4}[A-Z0-9]{14}$`),
	"BR": regexp.MustCompile(`^(?:BR[0-9]{2})\d{23}[A-Z]{1}[A-Z0-9]{1}$`),
	"BY": regexp.MustCompile(`^(?:BY[0-9]{2})[A-Z0-9]{4}\d{20}$`),
	"CH": regexp.MustCompile(`^(?:CH[0-9]{2})\d{5}[A-Z0-9]{12}$`),
	"CR": regexp.MustCompile(`^(?:CR[0-9]{2})\d{18}$`),
	"CY": regexp.MustCompile(`^(?:CY[0-9]{2})\d{8}[A-Z0-9]{16}$`),
	"CZ": regexp.MustCompile(`^(?:CZ[0-9]{2})\d{20}$`),
	"DE": regexp.MustCompile(`^(?:DE[0-9]{2})\d{18}$`),
	"DK": regexp.MustCompile(`^(?:DK[0-9]{2})\d{14}$`),
	"DO": regexp.MustCompile(`^(?:DO[0-9]{2})[A-Z]{4}\d{20}$`),
	"EE": regexp.MustCompile(`^(?:EE[0-9]{2})\d{16}$`),
	"EG": regexp.MustCompile(`^(?:EG[0-9]{2})\d{25}$`),
	"ES": regexp.MustCompile(`^(?:ES[0-9]{2})\d{20}$`),
	"FI": regexp.MustCompile(`^(?:FI[0-9]{2})\d{14}$`),
	"FO": regexp.MustCompile(`^(?:FO[0-9]{2})\d{14}$`),
	"FR": regexp.MustCompile(`^(?:FR[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$`),
	"GB": regexp.MustCompile(`^(?:GB[0-9]{2})[A-Z]{4}\d{14}$`),
	"GE": regexp.MustCompile(`^(?:GE[0-9]{2})[A-Z0-9]{2}\d{16}$`),
	"GI": regexp.MustCompile(`^(?:GI[0-9]{2})[A-Z]{4}[A-Z0-9]{15}$`),
	"GL": regexp.MustCompile(`^(?:GL[0-9]{2})\d{14}$`),
	"GR": regexp.MustCompile(`^(?:GR[0-9]{2})\d{7}[A-Z0-9]{16}$`),
	"GT": regexp.MustCompile(`^(?:GT[0-9]{2})[A-Z0-9]{4}[A-Z0-9]{20}$`),
	"HR": regexp.MustCompile(`^(?:HR[0-9]{2})\d{17}$`),
	"HU": regexp.MustCompile(`^(?:HU[0-9]{2})\d{24}$`),
	"IE": regexp.MustCompile(`^(?:IE[0-9]{2})[A-Z0-9]{4}\d{14}$`),
	"IL": regexp.MustCompile(`^(?:IL[0-9]{2})\d{19}$`),
	"IQ": regexp.MustCompile(`^(?:IQ[0-9]{2})[A-Z]{4}\d{15}$`),
	"IR": regexp.MustCompile(`^(?:IR[0-9]{2})0\d{2}0\d{18}$`),
	"IS": regexp.MustCompile(`^(?:IS[0-9]{2})\d{22}$`),
	"IT": regexp.MustCompile(`^(?:IT[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$`),
	"JO": regexp.MustCompile(`^(?:JO[0-9]{2})[A-Z]{4}\d{22}$`),
	"KW": regexp.MustCompile(`^(?:KW[0-9]{2})[A-Z]{4}[A-Z0-9]{22}$`),
	"KZ": regexp.MustCompile(`^(?:KZ[0-9]{2})\d{3}[A-Z0-9]{13}$`),
	"LB": regexp.MustCompile(`^(?:LB[0-9]{2})\d{4}[A-Z0-9]{20}$`),
	"LC": regexp.MustCompile(`^(?:LC[0-9]{2})[A-Z]{4}[A-Z0-9]{24}$`),
	"LI": regexp.MustCompile(`^(?:LI[0-9]{2})\d{5}[A-Z0-9]{12}$`),
	"LT": regexp.MustCompile(`^(?:LT[0-9]{2})\d{16}$`),
	"LU": regexp.MustCompile(`^(?:LU[0-9]{2})\d{3}[A-Z0-9]{13}$`),
	"LV": regexp.MustCompile(`^(?:LV[0-9]{2})[A-Z]{4}[A-Z0-9]{13}$`),
	"MC": regexp.MustCompile(`^(?:MC[0-9]{2})\d{10}[A-Z0-9]{11}\d{2}$`),
	"MD": regexp.MustCompile(`^(?:MD[0-9]{2})[A-Z0-9]{20}$`),
	"ME": regexp.MustCompile(`^(?:ME[0-9]{2})\d{18}$`),
	"MK": regexp.MustCompile(`^(?:MK[0-9]{2})\d{3}[A-Z0-9]{10}\d{2}$`),
	"MR": regexp.MustCompile(`^(?:MR[0-9]{2})\d{23}$`),
	"MT": regexp.MustCompile(`^(?:MT[0-9]{2})[A-Z]{4}\d{5}[A-Z0-9]{18}$`),
	"MU": regexp.MustCompile(`^(?:MU[0-9]{2})[A-Z]{4}\d{19}[A-Z]{3}$`),
	"NL": regexp.MustCompile(`^(?:NL[0-9]{2})[A-Z]{4}\d{10}$`),
	"NO": regexp.MustCompile(`^(?:NO[0-9]{2})\d{11}$`),
	"PK": regexp.MustCompile(`^(?:PK[0-9]{2})[A-Z0-9]{4}\d{16}$`),
	"PL": regexp.MustCompile(`^(?:PL[0-9]{2})\d{24}$`),
	"PS": regexp.MustCompile(`^(?:PS[0-9]{2})[A-Z0-9]{4}\d{21}$`),
	"PT": regexp.MustCompile(`^(?:PT[0-9]{2})\d{21}$`),
	"QA": regexp.MustCompile(`^(?:QA[0-9]{2})[A-Z]{4}[A-Z0-9]{21}$`),
	"RO": regexp.MustCompile(`^(?:RO[0-9]{2})[A-Z]{4}[A-Z0-9]{16}$`),
	"RS": regexp.MustCompile(`^(?:RS[0-9]{2})\d{18}$`),
	"SA": regexp.MustCompile(`^(?:SA[0-9]{2})\d{2}[A-Z0-9]{18}$`),
	"SC": regexp.MustCompile(`^(?:SC[0-9]{2})[A-Z]{4}\d{20}[A-Z]{3}$`),
	"SE": regexp.MustCompile(`^(?:SE[0-9]{2})\d{20}$`),
	"SI": regexp.MustCompile(`^(?:SI[0-9]{2})\d{15}$`),
	"SK": regexp.MustCompile(`^(?:SK[0-9]{2})\d{20}$`),
	"SM": regexp.MustCompile(`^(?:SM[0-9]{2})[A-Z]{1}\d{10}[A-Z0-9]{12}$`),
	"SV": regexp.MustCompile(`^(?:SV[0-9]{2})[A-Z0-9]{4}\d{20}$`),
	"TL": regexp.MustCompile(`^(?:TL[0-9]{2})\d{19}$`),
	"TN": regexp.MustCompile(`^(?:TN[0-9]{2})\d{20}$`),
	"TR": regexp.MustCompile(`^(?:TR[0-9]{2})\d{5}[A-Z0-9]{17}$`),
	"UA": regexp.MustCompile(`^(?:UA[0-9]{2})\d{6}[A-Z0-9]{19}$`),
	"VA": regexp.MustCompile(`^(?:VA[0-9]{2})\d{18}$`),
	"VG": regexp.MustCompile(`^(?:VG[0-9]{2})[A-Z0-9]{4}\d{16}$`),
	"XK": regexp.MustCompile(`^(?:XK[0-9]{2})\d{16}$`),
}

Map of country codes with corresponding IBAN regular expression. Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number

View Source
var ISO4217 = make(map[string]Currency)
View Source
var ISO_639_1 = make(map[string]Language)
View Source
var ISO_639_2 = make(map[string]Language)

Functions

This section is empty.

Types

type Currency

type Currency struct {

	// The symbol(s) of the currency.
	Sym []string
	// List of strings that can optionally be used to separate the
	// symbol from the monetary value.
	Sep []string
	// Inidicates whether or not the currency's symbol should be on
	// the left side of the monetary value.
	Left bool
	// Inidicates whether or not the currency's symbol should be on
	// the right side of the monetary value.
	Right bool
	// The number of digits after the decimal separator.
	DecNum int
	// The decimal separator(s) of the currency.
	DecSep []rune
	// The thousands separator(s) of the currency.
	ThoSep []rune
	// Optional alternative numerals of the currency.
	AltNum string
	// contains filtered or unexported fields
}

type Language

type Language struct {
	ISO_639_2 string // ISO 639‑2 (three letter codes)
	ISO_639_1 string // ISO 639‑1 (two letter codes)
	Name      string // english name of the language
	Alphabet  string // alphabet of the language
	Numerals  string // numerals of the language
	Decimal   rune   // the decimal separator of the language
}

Jump to

Keyboard shortcuts

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