Documentation ¶
Index ¶
- Variables
- type Generator
- func (g *Generator) Address() string
- func (g *Generator) BuildingNumber() string
- func (g *Generator) Chrome() string
- func (g *Generator) City() string
- func (g *Generator) CityPrefix() string
- func (g *Generator) CitySuffix() string
- func (g *Generator) Color() string
- func (g *Generator) DateFormatter(layout, datetime string) string
- func (g *Generator) DateTimeAfter(afterObj time.Time) time.Time
- func (g *Generator) DateTimeAfterWithString(after string) time.Time
- func (g *Generator) DateTimeBefore(beforeObj time.Time) time.Time
- func (g *Generator) DateTimeBeforeWithString(before string) time.Time
- func (g *Generator) DateTimeBetween(afterObj time.Time, beforeObj time.Time) time.Time
- func (g *Generator) DateTimeBetweenWithString(after string, before string) time.Time
- func (g *Generator) Email() string
- func (g *Generator) EmailFemale() string
- func (g *Generator) EmailMale() string
- func (g *Generator) Firefox() string
- func (g *Generator) FirstName() string
- func (g *Generator) FirstNameFemale() string
- func (g *Generator) FirstNameMale() string
- func (g *Generator) Gender() string
- func (g *Generator) GenericGenerator(intended string) string
- func (g *Generator) InternetExplorer() string
- func (g *Generator) LastName() string
- func (g *Generator) LastNameFemale() string
- func (g *Generator) LastNameMale() string
- func (g *Generator) Locale() string
- func (g *Generator) LocaleWithUnderscore() string
- func (g *Generator) LoremParagraph() string
- func (g *Generator) LoremSentence() string
- func (g *Generator) LoremWord() string
- func (g *Generator) MasterCard() string
- func (g *Generator) MilitaryAPO() string
- func (g *Generator) MilitaryDPO() string
- func (g *Generator) MilitaryShipPrefix() string
- func (g *Generator) MilitaryStateAbbr() string
- func (g *Generator) Name() string
- func (g *Generator) NameFemale() string
- func (g *Generator) NameMale() string
- func (g *Generator) Opera() string
- func (g *Generator) PaymentCard() string
- func (g *Generator) Phone() string
- func (g *Generator) Postcode() string
- func (g *Generator) Prefix() string
- func (g *Generator) PrefixFemale() string
- func (g *Generator) PrefixMale() string
- func (g *Generator) Safari() string
- func (g *Generator) SecondaryAddress() string
- func (g *Generator) SetLanguage(localeVar string)
- func (g *Generator) State() string
- func (g *Generator) StateAbbr() string
- func (g *Generator) StreetAddress() string
- func (g *Generator) StreetName() string
- func (g *Generator) StreetSuffix() string
- func (g *Generator) Suffix() string
- func (g *Generator) SuffixFemale() string
- func (g *Generator) SuffixMale() string
- func (g *Generator) UserAgent() string
- func (g *Generator) VisaCard() string
Constants ¶
This section is empty.
Variables ¶
var Print = fmt.Println
Debugging purposes
Functions ¶
This section is empty.
Types ¶
type Generator ¶
Generator struct to access various generator functions
func C ¶
C is the creator function, initiates kolpa with or without locale setting. The default locale setting is "en_US". Returns a generator type that will be used to call generator methods.
func (*Generator) Address ¶
Address function returns a random full address. A convenience function, same as g.GenericGenerator("address_address"). Sample Output: 52185 Katelyn Court Suite 559, Romanstad, AZ 80645
func (*Generator) BuildingNumber ¶
BuildingNumber function returns a random building number. A convenience function, same as g.GenericGenerator("address_building_number"). Sample Output: 27689
func (*Generator) Chrome ¶
Chrome function returns a random Chrome user agent. A convenience function, same as g.GenericGenerator("user_agent_chrome").
func (*Generator) City ¶
City function returns a random city name. A convenience function, same as g.GenericGenerator("address_building_number"). Sample Output: 27689
func (*Generator) CityPrefix ¶
CityPrefix function returns a random city prefix. A convenience function, same as g.GenericGenerator("address_city_prefix"). Sample Output: Lake
func (*Generator) CitySuffix ¶
CitySuffix function returns a random city suffix. A convenience function, same as g.GenericGenerator("address_city_suffix"). Sample Output: fort
func (*Generator) DateFormatter ¶
DateFormatter formats given datetime string with given layout. To define your own format, write down what the reference time would look like formatted your way; see the values of constants like ANSIC, StampMicro or Kitchen of time package for examples.
func (*Generator) DateTimeAfter ¶
DateTimeAfter returns a time.Time typed variable which is a pseudo-random datetime that points to a date and time pair that is after the given datetime parameter.
func (*Generator) DateTimeAfterWithString ¶
DateTimeAfterWithString is same with DateTimeAfter but takes datetime parameter as string with time.RFC3339 builtin format.
func (*Generator) DateTimeBefore ¶
DateTimeBefore returns a time.Time typed variable which is a pseudo-random datetime that points to a date and time pair that is before the given datetime parameter.
func (*Generator) DateTimeBeforeWithString ¶
DateTimeBeforeWithString is same with DateTimeBefore but takes datetime parameter as string with time.RFC3339 builtin format.
func (*Generator) DateTimeBetween ¶
DateTimeBetween returns a time.Time typed variable which is a pseudo-random datetime that points to a date and time pair between given datetime interval.
func (*Generator) DateTimeBetweenWithString ¶
DateTimeBetweenWithString is same with DateTimeBetween but takes interval as strings with time.RFC3339 builtin format.
func (*Generator) Email ¶
Address function returns a random email address. A convenience function, same as g.GenericGenerator("email"), but only for en_US language Sample Output: Jay.Hayden@fakemail.com
func (*Generator) EmailFemale ¶
Address function returns a random female email address. A convenience function, same as g.GenericGenerator("email_female"), but only for en_US language Sample Output: Alice.Hayden@fakemail.com
func (*Generator) EmailMale ¶
Address function returns a random male email address. A convenience function, same as g.GenericGenerator("email_male"), but only for en_US language Sample Output: Jay.Hayden@fakemail.com
func (*Generator) Firefox ¶
Firefox function returns a random Mozilla Firefox user agent. A convenience function, same as g.GenericGenerator("user_agent_firefox").
func (*Generator) FirstName ¶
FirstName function returns a random first name. A convenience function, same as g.GenericGenerator("person_first_name"). Sample Output: Jane
func (*Generator) FirstNameFemale ¶
FirstNameFemale function returns a random female first name. A convenience function, same as g.GenericGenerator("person_first_name_female"). Sample Output: Jane
func (*Generator) FirstNameMale ¶
FirstNameMale function returns a random male first name. A convenience function, same as g.GenericGenerator("person_first_name_male"). Sample Output: John
func (*Generator) GenericGenerator ¶
GenericGenerator is the generic function that powers all generations within kolpa. Recursively generates data for intended data type. Intended variable should be slug version of a valid data type.
func (*Generator) InternetExplorer ¶
InternetExplorer function returns a random Internet Explorer user agent. A convenience function, same as g.GenericGenerator("user_agent_internet_explorer").
func (*Generator) LastName ¶
LastName function returns a random last name. A convenience function, same as g.GenericGenerator("person_last_name"). Sample Output: Doe
func (*Generator) LastNameFemale ¶
LastNameFemale function returns a random female last name. A convenience function, same as g.GenericGenerator("person_last_name_female"). Sample Output: Doe
func (*Generator) LastNameMale ¶
LastNameMale function returns a random male last name. A convenience function, same as g.GenericGenerator("person_last_name_male"). Sample Output: Doe
func (*Generator) Locale ¶
Locale function returns a random locale with format of en-US. A convenience function, same as g.GenericGenerator("locale").
func (*Generator) LocaleWithUnderscore ¶
LocaleWithUnderscore function returns a random locale with format of en_US. A convenience function, same as g.GenericGenerator("locale_").
func (*Generator) LoremParagraph ¶
LoremParagraph function returns a random lorem paragraph. Sample Output: Quia et minima saepe aspernatur laboriosam non id eum. Nulla iste ea necessitatibus molestiae omnis et est. Nisi cum commodi ex rerum aperiam earum in.
func (*Generator) LoremSentence ¶
LoremSentence function returns a random lorem sentence. Sample Output: Provident nobis nostrum blanditiis voluptatem animi rerum harum.
func (*Generator) LoremWord ¶
LoremWord function returns a random lorem word. A convenience function, same as g.GenericGenerator("lorem_word"). Sample Output: dolores
func (*Generator) MasterCard ¶
PaymentCard function returns a random master card number. A convenience function, same as g.GenericGenerator("payment_master_card"). Sample Output: 5154214251151243
func (*Generator) MilitaryAPO ¶
MilitaryAPO function returns a random military APO. A convenience function, same as g.GenericGenerator("address_military_apo"). Sample Output: PSC 3455, Box 7670
func (*Generator) MilitaryDPO ¶
MilitaryDPO function returns a random military DPO. A convenience function, same as g.GenericGenerator("address_military_dpo"). Sample Output: Unit 5426 Box 1476
func (*Generator) MilitaryShipPrefix ¶
MilitaryShipPrefix function returns a random military ship prefix. A convenience function, same as g.GenericGenerator("address_military_ship_prefix"). Sample Output: USCGC
func (*Generator) MilitaryStateAbbr ¶
MilitaryStateAbbr function returns a random military state abbreviation. A convenience function, same as g.GenericGenerator("address_military_state_abbr"). Sample Output: AE
func (*Generator) Name ¶
Name function returns a random full person name. A convenience function, same as g.GenericGenerator("person_format"). Sample Output: John Doe
func (*Generator) NameFemale ¶
NameFemale function returns a random full female name by using a random female name format. A convenience function, same as g.GenericGenerator("person_format_female"). Sample Output: Jane Doe
func (*Generator) NameMale ¶
NameMale function returns a random full male name by using a random male name format. A convenience function, same as g.GenericGenerator("person_format_male"). Sample Output: John Doe
func (*Generator) Opera ¶
Opera function returns a random Opera user agent. A convenience function, same as g.GenericGenerator("user_agent_opera").
func (*Generator) PaymentCard ¶
PaymentCard function returns a random payment card number. A convenience function, same as g.GenericGenerator("payment_card"). Sample Output: 24208918642114291
func (*Generator) Phone ¶
Phone function returns a random phone number. A convenience function, same as g.GenericGenerator("phone") Sample Output: +55-44-63311072
func (*Generator) Postcode ¶
Postcode function returns a random postcode. A convenience function, same as g.GenericGenerator("address_postcode"). Sample Output: 17073
func (*Generator) Prefix ¶
Prefix function returns a random prefix. A convenience function, same as g.GenericGenerator("person_prefix"). Sample Output: Dr.
func (*Generator) PrefixFemale ¶
PrefixFemale function returns a random female prefix. A convenience function, same as g.GenericGenerator("person_prefix_female"). Sample Output: Ms.
func (*Generator) PrefixMale ¶
PrefixMale function returns a random male prefix. A convenience function, same as g.GenericGenerator("person_prefix_male"). Sample Output: Mr.
func (*Generator) Safari ¶
Safari function returns a random Apple Safari user agent. A convenience function, same as g.GenericGenerator("user_agent_safari").
func (*Generator) SecondaryAddress ¶
SecondaryAddress function returns a random secondary address. A convenience function, same as g.GenericGenerator("address_secondary_address"). Sample Output: Apt. 786
func (*Generator) SetLanguage ¶
SetLanguage is the language setter function. Language setting change be changed anytime by using this function.
func (*Generator) State ¶
State function returns a random state name. A convenience function, same as g.GenericGenerator("address_state"). Sample Output: Illinois
func (*Generator) StateAbbr ¶
StateAbbr function returns a random state name abbreviation. A convenience function, same as g.GenericGenerator("address_state_abbr"). Sample Output: AL
func (*Generator) StreetAddress ¶
StreetAddress function returns a random street address. A convenience function, same as g.GenericGenerator("address_street_address"). Sample Output: 98191 Miranda Knoll
func (*Generator) StreetName ¶
StreetName function returns a random street name. A convenience function, same as g.GenericGenerator("address_street_name"). Sample Output: Rodney Station
func (*Generator) StreetSuffix ¶
StreetSuffix function returns a random street suffix.s A convenience function, same as g.GenericGenerator("address_street_suffix"). Sample Output: Pines
func (*Generator) Suffix ¶
Suffix function returns a random suffix. A convenience function, same as return g.GenericGenerator("person_suffix"). Sample Output: PhD.
func (*Generator) SuffixFemale ¶
SuffixFemale function returns a random female suffix. A convenience function, same as g.GenericGenerator("person_suffix_female"). Sample Output: MD.
func (*Generator) SuffixMale ¶
SuffixMale function returns a random male suffix. A convenience function, same as g.GenericGenerator("person_suffix_male"). Sample Output: Jr..