fakedata

package
v2.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

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) Brand

func (fa FakeAdapter) Brand() string

Brand returns a random Brand

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) City

func (fa FakeAdapter) City() string

City returns a random City

func (FakeAdapter) Color

func (fa FakeAdapter) Color() string

Color returns a random Color

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) Day

func (fa FakeAdapter) Day() string

Day returns a random day

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) Gender

func (fa FakeAdapter) Gender() string

Gender returns a random Gender

func (FakeAdapter) IPv4

func (fa FakeAdapter) IPv4() string

IPv4 returns a random IPv4

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) Model

func (fa FakeAdapter) Model() string

Model returns a random Model

func (FakeAdapter) Month

func (fa FakeAdapter) Month() string

Month returns a random month

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) Phone

func (fa FakeAdapter) Phone() string

Phone returns a random Phone

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) State

func (fa FakeAdapter) State() string

State returns a random state

func (FakeAdapter) StateAbbrev

func (fa FakeAdapter) StateAbbrev() string

StateAbbrev returns a random state abbrev

func (FakeAdapter) Street

func (fa FakeAdapter) Street() string

Street returns a random street

func (FakeAdapter) StreetAddress

func (fa FakeAdapter) StreetAddress() string

StreetAddress returns a random street address

func (FakeAdapter) UUID

func (fa FakeAdapter) UUID() string

UUID generates a unique id

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) Word

func (fa FakeAdapter) Word() string

Word returns a random word

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)

func (FakeAdapter) Zip

func (fa FakeAdapter) Zip() string

Zip returns a random zip

Jump to

Keyboard shortcuts

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