Documentation ¶
Index ¶
- type CreditCardGenerator
- type Generator
- type Provider
- func (p Provider) Brand() string
- func (p Provider) Character() string
- func (p Provider) Characters() string
- func (p Provider) CharactersN(n int) string
- func (p Provider) City() string
- func (p Provider) Color() string
- func (p Provider) Company() string
- func (p Provider) Continent() string
- func (p Provider) Country() string
- func (p Provider) CreditCardAmericanExpress() string
- func (p Provider) CreditCardMasterCard() string
- func (p Provider) CreditCardVisa() string
- func (p Provider) CreditCardVisaElectron() string
- func (p Provider) Currency() string
- func (p Provider) CurrencyCode() string
- func (p Provider) Day() string
- func (p Provider) Digits() string
- func (p Provider) DigitsN(n int) string
- func (p Provider) EmailAddress() string
- func (p Provider) FirstName() string
- func (p Provider) Float(n int) string
- func (p Provider) FullName() string
- func (p Provider) Gender() string
- func (p Provider) Hex(n int) string
- func (p Provider) IPv4() string
- func (p Provider) Int(n int) string
- func (p Provider) IntMinMax(values ...int) string
- func (p Provider) Language() string
- func (p Provider) LastName() string
- func (p Provider) Model() string
- func (p Provider) Month() string
- func (p Provider) MonthNum() string
- func (p Provider) MonthShort() string
- func (p Provider) Paragraph() string
- func (p Provider) Paragraphs() string
- func (p Provider) ParagraphsN(n int) string
- func (p Provider) Phone() string
- func (p Provider) Product() string
- func (p Provider) Sentence() string
- func (p Provider) Sentences() string
- func (p Provider) SentencesN(n int) string
- func (p Provider) SimplePassword() string
- func (p Provider) State() string
- func (p Provider) StateAbbrev() string
- func (p Provider) Street() string
- func (p Provider) StreetAddress() string
- func (p Provider) UUID() string
- func (p Provider) UserName() string
- func (p Provider) WeekDay() string
- func (p Provider) Word() string
- func (p Provider) Words() string
- func (p Provider) WordsN(n int) string
- func (p Provider) Year() string
- func (p Provider) Zip() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreditCardGenerator ¶
type CreditCardGenerator struct { }
func NewCreditCardGenerator ¶
func NewCreditCardGenerator() *CreditCardGenerator
func (*CreditCardGenerator) CreditCardAmericanExpress ¶
func (c *CreditCardGenerator) CreditCardAmericanExpress() string
func (*CreditCardGenerator) CreditCardDiscover ¶
func (c *CreditCardGenerator) CreditCardDiscover() string
func (*CreditCardGenerator) CreditCardMasterCard ¶
func (c *CreditCardGenerator) CreditCardMasterCard() string
func (*CreditCardGenerator) CreditCardVisa ¶
func (c *CreditCardGenerator) CreditCardVisa() string
func (*CreditCardGenerator) CreditCardVisaElectron ¶
func (c *CreditCardGenerator) CreditCardVisaElectron() string
type Generator ¶
type Generator 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 Hex(n int) string IPv4() string Language() string Model() string Month() string Year() string MonthShort() string MonthNum() 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 }
Generator interface contains the funtions to obtain the fake data to fill the response.
type Provider ¶
type Provider struct {
// contains filtered or unexported fields
}
Provider contains all available functions to create random data in the mock response.
func NewFakeDataProvider ¶
func NewFakeDataProvider(ccg *CreditCardGenerator) *Provider
func (Provider) Characters ¶
Characters returns from 1 to 5 random Characters
func (Provider) CharactersN ¶
CharactersN returns n random Characters
func (Provider) CreditCardAmericanExpress ¶
CreditCardAmericanExpress returns a random CreditCardAmericanExpress
func (Provider) CreditCardMasterCard ¶
CreditCardMasterCard returns a random CreditCardMasterCard
func (Provider) CreditCardVisa ¶
CreditCardVisa returns a random CreditCardVisa
func (Provider) CreditCardVisaElectron ¶
CreditCardVisaElectron returns a random CreditCardVisaElectron
func (Provider) CurrencyCode ¶
CurrencyCode returns a random CurrencyCode
func (Provider) EmailAddress ¶
EmailAddress returns a random EmailAddress
func (Provider) IntMinMax ¶
IntMinMax returns a random positive number greater than min and lower than max
func (Provider) MonthShort ¶
MonthShort returns a random month (Short Version)
func (Provider) Paragraphs ¶
Paragraphs returns from 1 to 5 random Paragraphs
func (Provider) ParagraphsN ¶
ParagraphsN returns n random Paragraphs
func (Provider) SentencesN ¶
SentencesN returns n random sentences
func (Provider) SimplePassword ¶
SimplePassword returns a random simple password
func (Provider) StateAbbrev ¶
StateAbbrev returns a random state abbrev
func (Provider) StreetAddress ¶
StreetAddress returns a random street address