vars

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DummyDataFaker

type DummyDataFaker struct {
	Dummy string
}

DummyDataFaker is used in tests

func (DummyDataFaker) Brand

func (ddf DummyDataFaker) Brand() string

func (DummyDataFaker) Character

func (ddf DummyDataFaker) Character() string

func (DummyDataFaker) Characters

func (ddf DummyDataFaker) Characters() string

func (DummyDataFaker) City

func (ddf DummyDataFaker) City() string

func (DummyDataFaker) Color

func (ddf DummyDataFaker) Color() string

func (DummyDataFaker) Company

func (ddf DummyDataFaker) Company() string

func (DummyDataFaker) Continent

func (ddf DummyDataFaker) Continent() string

func (DummyDataFaker) Country

func (ddf DummyDataFaker) Country() string

func (DummyDataFaker) CreditCardAmericanExpress

func (ddf DummyDataFaker) CreditCardAmericanExpress() string

func (DummyDataFaker) CreditCardMasterCard

func (ddf DummyDataFaker) CreditCardMasterCard() string

func (DummyDataFaker) CreditCardVisa

func (ddf DummyDataFaker) CreditCardVisa() string

func (DummyDataFaker) Currency

func (ddf DummyDataFaker) Currency() string

func (DummyDataFaker) CurrencyCode

func (ddf DummyDataFaker) CurrencyCode() string

func (DummyDataFaker) Day

func (ddf DummyDataFaker) Day() string

func (DummyDataFaker) Digits

func (ddf DummyDataFaker) Digits() string

func (DummyDataFaker) EmailAddress

func (ddf DummyDataFaker) EmailAddress() string

func (DummyDataFaker) FirstName

func (ddf DummyDataFaker) FirstName() string

func (DummyDataFaker) FullName

func (ddf DummyDataFaker) FullName() string

func (DummyDataFaker) Gender

func (ddf DummyDataFaker) Gender() string

func (DummyDataFaker) IPv4

func (ddf DummyDataFaker) IPv4() string

func (DummyDataFaker) Language

func (ddf DummyDataFaker) Language() string

func (DummyDataFaker) LastName

func (ddf DummyDataFaker) LastName() string

func (DummyDataFaker) Model

func (ddf DummyDataFaker) Model() string

func (DummyDataFaker) Month

func (ddf DummyDataFaker) Month() string

func (DummyDataFaker) MonthShort

func (ddf DummyDataFaker) MonthShort() string

func (DummyDataFaker) Paragraph

func (ddf DummyDataFaker) Paragraph() string

func (DummyDataFaker) Paragraphs

func (ddf DummyDataFaker) Paragraphs() string

func (DummyDataFaker) Phone

func (ddf DummyDataFaker) Phone() string

func (DummyDataFaker) Product

func (ddf DummyDataFaker) Product() string

func (DummyDataFaker) Sentence

func (ddf DummyDataFaker) Sentence() string

func (DummyDataFaker) Sentences

func (ddf DummyDataFaker) Sentences() string

func (DummyDataFaker) SimplePassword

func (ddf DummyDataFaker) SimplePassword() string

func (DummyDataFaker) State

func (ddf DummyDataFaker) State() string

func (DummyDataFaker) StateAbbrev

func (ddf DummyDataFaker) StateAbbrev() string

func (DummyDataFaker) Street

func (ddf DummyDataFaker) Street() string

func (DummyDataFaker) StreetAddress

func (ddf DummyDataFaker) StreetAddress() string

func (DummyDataFaker) UserName

func (ddf DummyDataFaker) UserName() string

func (DummyDataFaker) WeekDay

func (ddf DummyDataFaker) WeekDay() string

func (DummyDataFaker) Word

func (ddf DummyDataFaker) Word() string

func (DummyDataFaker) Words

func (ddf DummyDataFaker) Words() string

func (DummyDataFaker) Year

func (ddf DummyDataFaker) Year() string

func (DummyDataFaker) Zip

func (ddf DummyDataFaker) Zip() string

type FakeVars

type FakeVars struct {
	Fake fakedata.DataFaker
}

FakeVars parses the data looking for fake data tags or request data tags

func (FakeVars) Fill

func (fv FakeVars) Fill(m *definition.Mock, input string, multipleMatch bool) string

type Filler

type Filler interface {
	Fill(m *definition.Mock, input string, multipleMatch bool) string
}

type FillerFactory

type FillerFactory interface {
	CreateRequestFiller(req *definition.Request) Filler
	CreateFakeFiller(Fake fakedata.DataFaker) Filler
	CreateStorageFiller(Engines *persist.PersistEngineBag) Filler
	CreatePersistFiller(Engines *persist.PersistEngineBag) Filler
}

type MockFillerFactory

type MockFillerFactory struct{}

func (MockFillerFactory) CreateFakeFiller

func (mff MockFillerFactory) CreateFakeFiller(fake fakedata.DataFaker) Filler

func (MockFillerFactory) CreatePersistFiller

func (mff MockFillerFactory) CreatePersistFiller(engines *persist.PersistEngineBag) Filler

func (MockFillerFactory) CreateRequestFiller

func (mff MockFillerFactory) CreateRequestFiller(req *definition.Request) Filler

func (MockFillerFactory) CreateStorageFiller

func (mff MockFillerFactory) CreateStorageFiller(engines *persist.PersistEngineBag) Filler

type PersistVars

type PersistVars struct {
	Engines     *persist.PersistEngineBag
	RegexHelper utils.RegexHelper
}

func (PersistVars) Fill

func (pv PersistVars) Fill(m *definition.Mock, input string, multipleMatch bool) string

type RequestVars

type RequestVars struct {
	Request     *definition.Request
	RegexHelper utils.RegexHelper
}

func (RequestVars) Fill

func (rp RequestVars) Fill(m *definition.Mock, input string, multipleMatch bool) string

type StorageVars

type StorageVars struct {
	Engines     *persist.PersistEngineBag
	RegexHelper utils.RegexHelper
}

func (StorageVars) Fill

func (lv StorageVars) Fill(m *definition.Mock, input string, multipleMatch bool) string

func (StorageVars) Process

func (lv StorageVars) Process(r *regexp.Regexp, m *definition.Mock, input string) string

type VarsProcessor

type VarsProcessor struct {
	FillerFactory  FillerFactory
	FakeAdapter    fakedata.DataFaker
	PersistEngines *persist.PersistEngineBag
}

func (VarsProcessor) Eval

func (fp VarsProcessor) Eval(req *definition.Request, m *definition.Mock)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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