-
Notifications
You must be signed in to change notification settings - Fork 11
/
init.go
146 lines (144 loc) · 7.46 KB
/
init.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
package faker
var db = PoolData{
"address": addressData,
"color": colorData,
"country": countryData,
"currency": currencyData,
"gender": genderData,
"internet": internetData,
"lang": langData,
"name": nameData,
"sentence": sentenceData,
"timezone": timezoneData,
}
var builders = map[string]builderFunc{
// address
builderKey("AddressCity", "string"): addressCityBuilder,
builderKey("AddressState", "string"): addressStateBuilder,
builderKey("AddressStateCode", "string"): addressStateCodeBuilder,
builderKey("AddressStreetName", "string"): addressStreetNameBuilder,
builderKey("AddressStreetNumber", "string"): addressStreetNumberBuilder,
builderKey("AddressSecondaryAddress", "string"): addressSecondaryAddressBuilder,
builderKey("AddressZip", "string"): addressZipBuilder,
builderKey("AddressFull", "string"): addressFullBuilder,
// color
builderKey("ColorName", "string"): colorNameBuilder,
builderKey("ColorHex", "string"): colorHexBuilder,
builderKey("ColorRGB", "[3]int"): colorRGBBuilder,
builderKey("ColorHSL", "[3]int"): colorHSLBuilder,
// country
builderKey("CountryName", "string"): countryNameBuilder,
builderKey("CountryAlpha2", "string"): countryAlpha2Builder,
builderKey("CountryAlpha3", "string"): countryAlpha3Builder,
builderKey("CountryNationality", "string"): countryNationalityBuilder,
builderKey("CountryFlag", "string"): countryFlagBuilder,
// currency
builderKey("CurrencyName", "string"): currencyNameBuilder,
builderKey("CurrencyCode", "string"): currencyCodeBuilder,
builderKey("CurrencySymbol", "string"): currencySymbolBuilder,
// gender
builderKey("Gender", "string"): genderBuilder,
builderKey("BinaryGender", "string"): binaryGenderBuilder,
builderKey("ShortBinaryGender", "string"): shortBinaryGenderBuilder,
// internet
builderKey("Username", "string"): usernameBuilder,
builderKey("Domain", "string"): domainBuilder,
builderKey("Email", "string"): emailBuilder,
builderKey("FreeEmail", "string"): freeEmailBuilder,
builderKey("SafeEmail", "string"): safeEmailBuilder,
builderKey("Slug", "string"): slugBuilder,
builderKey("Url", "string"): urlBuilder,
// lang
builderKey("LangName", "string"): langNameBuilder,
builderKey("LangCode", "string"): langCodeBuilder,
// misc
builderKey("Bool", "bool"): boolBuilder,
builderKey("", "bool"): boolBuilder,
builderKey("PhoneNumber", "string"): phoneNumberBuilder,
builderKey("Uuid", "string"): uuidBuilder,
// name
builderKey("MaleFirstName", "string"): maleFirstNameBuilder,
builderKey("FemaleFirstName", "string"): femaleFirstName,
builderKey("NeutralFirstName", "string"): neutralFirstNameBuilder,
builderKey("FirstName", "string"): firstNameBuilder,
builderKey("LastName", "string"): lastNameBuilder,
builderKey("NamePrefix", "string"): namePrefixBuilder,
builderKey("NameSuffix", "string"): nameSuffixBuilder,
builderKey("FullName", "string"): fullNameBuilder,
builderKey("NameInitials", "string"): nameInitialsBuilder,
// number
builderKey("IntInRange", "int"): intInRangeBuilder,
builderKey("Int", "int"): intBuilder,
builderKey("", "int"): intBuilder,
builderKey("Int64InRange", "int64"): int64InRangeBuilder,
builderKey("Int64", "int64"): int64Builder,
builderKey("", "int64"): int64Builder,
builderKey("Int32InRange", "int32"): int32InRangeBuilder,
builderKey("Int32", "int32"): int32Builder,
builderKey("", "int32"): int32Builder,
builderKey("Int16InRange", "int16"): int16InRangeBuilder,
builderKey("Int16", "int16"): int16Builder,
builderKey("", "int16"): int16Builder,
builderKey("Int8InRange", "int8"): int8InRangeBuilder,
builderKey("Int8", "int8"): int8Builder,
builderKey("", "int8"): int8Builder,
builderKey("UintInRange", "uint"): uintInRangeBuilder,
builderKey("Uint", "uint"): uintBuilder,
builderKey("", "uint"): uintBuilder,
builderKey("Uint64InRange", "uint64"): uint64InRangeBuilder,
builderKey("Uint64", "uint64"): uint64Builder,
builderKey("", "uint64"): uint64Builder,
builderKey("Uint32InRange", "uint32"): uint32InRangeBuilder,
builderKey("Uint32", "uint32"): uint32Builder,
builderKey("", "uint32"): uint32Builder,
builderKey("Uint16InRange", "uint16"): uint16InRangeBuilder,
builderKey("Uint16", "uint16"): uint16Builder,
builderKey("", "uint16"): uint16Builder,
builderKey("Uint8InRange", "uint8"): uint8InRangeBuilder,
builderKey("Uint8", "uint8"): uint8Builder,
builderKey("", "uint8"): uint8Builder,
builderKey("Float64InRange", "float64"): float64InRangeBuilder,
builderKey("Float64", "float64"): float64Builder,
builderKey("", "float64"): float64Builder,
builderKey("Float32InRange", "float32"): float32InRangeBuilder,
builderKey("Float32", "float32"): float32Builder,
builderKey("", "float32"): float32Builder,
// sentence
builderKey("Sentence", "string"): sentenceBuilder,
builderKey("ParagraphWithSentenceCount", "string"): paragraphWithSentenceCountBuilder,
builderKey("Paragraph", "string"): paragraphBuilder,
builderKey("ArticleWithParagraphCount", "string"): articleWithParagraphCountBuilder,
builderKey("Article", "string"): articleBuilder,
// string
builderKey("StringWithSize", "string"): stringWithSizeBuilder,
builderKey("String", "string"): stringBuilder,
builderKey("", "string"): stringBuilder,
builderKey("DigitsWithSize", "string"): digitsWithSizeBuilder,
builderKey("Digits", "string"): digitsBuilder,
builderKey("LettersWithSize", "string"): lettersWithSizeBuilder,
builderKey("Letters", "string"): lettersBuilder,
builderKey("Lexify", "string"): lexifyBuilder,
builderKey("Numerify", "string"): numerifyBuilder,
builderKey("Parameterize", "string"): parameterizeBuilder,
builderKey("Pick", "string"): pickBuilder,
// time
builderKey("DurationInRange", "time.Duration"): durationInRangeBuilder,
builderKey("Duration", "time.Duration"): durationBuilder,
builderKey("", "time.Duration"): durationBuilder,
builderKey("Time", "time.Time"): timeBuilder,
builderKey("", "time.Time"): timeBuilder,
builderKey("TimeNow", "time.Time"): timeNowBuilder,
builderKey("NanoSecond", "int"): nanoSecondBuilder,
builderKey("Second", "int"): secondBuilder,
builderKey("Minute", "int"): minuteBuilder,
builderKey("Hour", "int"): hourBuilder,
builderKey("Day", "int"): dayBuilder,
builderKey("WeekDay", "string"): weekDayBuilder,
builderKey("Month", "string"): monthBuilder,
builderKey("Year", "int"): yearBuilder,
builderKey("TimeZone", "string"): timeZoneBuilder,
builderKey("TimeZoneAbbr", "string"): timeZoneAbbrBuilder,
builderKey("TimeZoneFull", "string"): timeZoneFullBuilder,
builderKey("TimeZoneOffset", "float32"): timeZoneOffsetBuilder,
builderKey("TimeZoneRegion", "string"): timeZoneRegionBuilder,
}