Documentation ¶
Index ¶
- type DataFaker
- type FakeAdapter
- func (fa FakeAdapter) Brand() string
- func (fa FakeAdapter) Character() string
- func (fa FakeAdapter) Characters() string
- func (fa FakeAdapter) CharactersN(n int) string
- func (fa FakeAdapter) City() string
- func (fa FakeAdapter) Color() string
- func (fa FakeAdapter) Company() string
- func (fa FakeAdapter) Continent() string
- func (fa FakeAdapter) Country() string
- func (fa FakeAdapter) CreditCardAmericanExpress() string
- func (fa FakeAdapter) CreditCardMasterCard() string
- func (fa FakeAdapter) CreditCardVisa() string
- func (fa FakeAdapter) Currency() string
- func (fa FakeAdapter) CurrencyCode() string
- func (fa FakeAdapter) Day() string
- func (fa FakeAdapter) Digits() string
- func (fa FakeAdapter) DigitsN(n int) string
- func (fa FakeAdapter) EmailAddress() string
- func (fa FakeAdapter) FirstName() string
- func (fa FakeAdapter) Float(n int) string
- func (fa FakeAdapter) FullName() string
- func (fa FakeAdapter) Gender() string
- func (fa FakeAdapter) IPv4() string
- func (fa FakeAdapter) Int(n int) string
- func (fa FakeAdapter) IntMinMax(values ...int) string
- func (fa FakeAdapter) Language() string
- func (fa FakeAdapter) LastName() string
- func (fa FakeAdapter) Model() string
- func (fa FakeAdapter) Month() string
- func (fa FakeAdapter) MonthShort() string
- func (fa FakeAdapter) Paragraph() string
- func (fa FakeAdapter) Paragraphs() string
- func (fa FakeAdapter) ParagraphsN(n int) string
- func (fa FakeAdapter) Phone() string
- func (fa FakeAdapter) Product() string
- func (fa FakeAdapter) Sentence() string
- func (fa FakeAdapter) Sentences() string
- func (fa FakeAdapter) SentencesN(n int) string
- func (fa FakeAdapter) SimplePassword() string
- func (fa FakeAdapter) State() string
- func (fa FakeAdapter) StateAbbrev() string
- func (fa FakeAdapter) Street() string
- func (fa FakeAdapter) StreetAddress() string
- func (fa FakeAdapter) UUID() string
- func (fa FakeAdapter) UserName() string
- func (fa FakeAdapter) WeekDay() string
- func (fa FakeAdapter) Word() string
- func (fa FakeAdapter) Words() string
- func (fa FakeAdapter) WordsN(n int) string
- func (fa FakeAdapter) Year() string
- func (fa FakeAdapter) Zip() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataFaker ¶
type DataFaker interface { Brand() string Character() string Characters() string CharactersN(n int) string City() string Color() string Company() string Continent() string Country() string CreditCardVisa() string CreditCardMasterCard() string CreditCardAmericanExpress() string Currency() string CurrencyCode() string Day() string Digits() string DigitsN(n int) string EmailAddress() string FirstName() string FullName() string LastName() string Gender() string IPv4() string Language() string Model() string Month() string Year() string MonthShort() string Paragraph() string Paragraphs() string ParagraphsN(n int) string Phone() string Product() string Sentence() string Sentences() string SentencesN(n int) string SimplePassword() string State() string StateAbbrev() string Street() string StreetAddress() string UserName() string WeekDay() string Word() string Words() string Zip() string Int(n int) string IntMinMax(values ...int) string Float(n int) string UUID() string }
DataFaker interface contains the funtions to obtain the fake data to fill the response.
type FakeAdapter ¶
type FakeAdapter struct { }
FakeAdapter contains all available functions to create random data in the mock response.
func (FakeAdapter) Character ¶
func (fa FakeAdapter) Character() string
Character returns a random Character
func (FakeAdapter) Characters ¶
func (fa FakeAdapter) Characters() string
Characters returns from 1 to 5 random Characters
func (FakeAdapter) CharactersN ¶
func (fa FakeAdapter) CharactersN(n int) string
CharactersN returns n random Characters
func (FakeAdapter) Company ¶
func (fa FakeAdapter) Company() string
Company returns a random Company
func (FakeAdapter) Continent ¶
func (fa FakeAdapter) Continent() string
Continent returns a random Continent
func (FakeAdapter) Country ¶
func (fa FakeAdapter) Country() string
Country returns a random Country
func (FakeAdapter) CreditCardAmericanExpress ¶
func (fa FakeAdapter) CreditCardAmericanExpress() string
CreditCardAmericanExpress returns a random CreditCardAmericanExpress
func (FakeAdapter) CreditCardMasterCard ¶
func (fa FakeAdapter) CreditCardMasterCard() string
CreditCardMasterCard returns a random CreditCardMasterCard
func (FakeAdapter) CreditCardVisa ¶
func (fa FakeAdapter) CreditCardVisa() string
CreditCardVisa returns a random CreditCardVisa
func (FakeAdapter) Currency ¶
func (fa FakeAdapter) Currency() string
Currency returns a random Currency
func (FakeAdapter) CurrencyCode ¶
func (fa FakeAdapter) CurrencyCode() string
CurrencyCode returns a random CurrencyCode
func (FakeAdapter) Digits ¶
func (fa FakeAdapter) Digits() string
Digits returns from 1 to 5 random Digits
func (FakeAdapter) DigitsN ¶
func (fa FakeAdapter) DigitsN(n int) string
DigitsN returns n random Digits
func (FakeAdapter) EmailAddress ¶
func (fa FakeAdapter) EmailAddress() string
EmailAddress returns a random EmailAddress
func (FakeAdapter) FirstName ¶
func (fa FakeAdapter) FirstName() string
FirstName returns a random FirstName
func (FakeAdapter) Float ¶
func (fa FakeAdapter) Float(n int) string
Float returns a random positive floating point number less than n
func (FakeAdapter) FullName ¶
func (fa FakeAdapter) FullName() string
FullName returns a random FullName
func (FakeAdapter) Int ¶
func (fa FakeAdapter) Int(n int) string
Int returns a random positive number less than or equal to n
func (FakeAdapter) IntMinMax ¶
func (fa FakeAdapter) IntMinMax(values ...int) string
IntMinMax returns a random positive number greater than min and lower than max
func (FakeAdapter) Language ¶
func (fa FakeAdapter) Language() string
Language returns a random Language
func (FakeAdapter) LastName ¶
func (fa FakeAdapter) LastName() string
LastName returns a random LastName
func (FakeAdapter) MonthShort ¶
func (fa FakeAdapter) MonthShort() string
MonthShort returns a random month (Short Version)
func (FakeAdapter) Paragraph ¶
func (fa FakeAdapter) Paragraph() string
Paragraph returns a random Paragraph
func (FakeAdapter) Paragraphs ¶
func (fa FakeAdapter) Paragraphs() string
Paragraphs returns from 1 to 5 random Paragraphs
func (FakeAdapter) ParagraphsN ¶
func (fa FakeAdapter) ParagraphsN(n int) string
ParagraphsN returns n random Paragraphs
func (FakeAdapter) Product ¶
func (fa FakeAdapter) Product() string
Product returns a random Product
func (FakeAdapter) Sentence ¶
func (fa FakeAdapter) Sentence() string
Sentence returns a random sentence
func (FakeAdapter) Sentences ¶
func (fa FakeAdapter) Sentences() string
Sentences returns from 1 to 5 random sentences
func (FakeAdapter) SentencesN ¶
func (fa FakeAdapter) SentencesN(n int) string
SentencesN returns n random sentences
func (FakeAdapter) SimplePassword ¶
func (fa FakeAdapter) SimplePassword() string
SimplePassword returns a random simple password
func (FakeAdapter) StateAbbrev ¶
func (fa FakeAdapter) StateAbbrev() string
StateAbbrev returns a random state abbrev
func (FakeAdapter) StreetAddress ¶
func (fa FakeAdapter) StreetAddress() string
StreetAddress returns a random street address
func (FakeAdapter) UserName ¶
func (fa FakeAdapter) UserName() string
UserName returns a random username
func (FakeAdapter) WeekDay ¶
func (fa FakeAdapter) WeekDay() string
WeekDay returns a random day of week
func (FakeAdapter) Words ¶
func (fa FakeAdapter) Words() string
Words returns from 1 to 5 random words
func (FakeAdapter) WordsN ¶
func (fa FakeAdapter) WordsN(n int) string
WordsN returns n random words
func (FakeAdapter) Year ¶
func (fa FakeAdapter) Year() string
Year returns a random year between (1980,2020)