Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FakeValue ¶
func FakeValue( faker Source, sc *StringConstraint, nc *NumericConstraint, tc *TimestampConstraint, gc *GeneralConstraint, ) string
Types ¶
type GeneralConstraint ¶
type GeneralConstraint struct {
SkipChance float64 `yaml:"skipChance"`
}
func (*GeneralConstraint) Validate ¶
func (gc *GeneralConstraint) Validate() error
type NumericConstraint ¶
func (*NumericConstraint) Validate ¶
func (nc *NumericConstraint) Validate() error
type Source ¶
type Source string
var ( TypeFirstName Source = "FIRST_NAME" TypeLastName Source = "LAST_NAME" TypeEmail Source = "EMAIL" TypeUUID Source = "UUID" TypeTimestamp Source = "TIMESTAMP" TypeInt Source = "INTEGER" TypeString Source = "STRING" TypeBool Source = "BOOL" TypeCompany Source = "COMPANY" TypePhone Source = "PHONE" TypeStreet Source = "STREET" TypeCity Source = "CITY" TypeState Source = "STATE" TypeZip Source = "ZIP" TypeCountry Source = "COUNTRY" TypeMonth Source = "MONTH" TypeBeerName Source = "BEER_NAME" TypeBeerStyle Source = "BEER_STYLE" TypeYesNo Source = "YES_NO" // The list of "faker" values the application supports. // Note: This is just a subset of the fakers available in https://github.com/brianvoe/gofakeit // in addition to custom ones. AllSources = []Source{ TypeFirstName, TypeLastName, TypeBool, TypeEmail, TypeUUID, TypeTimestamp, TypeInt, TypeString, TypeBool, TypePhone, TypeStreet, TypeZip, TypeCompany, TypeMonth, TypeBeerName, TypeBeerStyle, TypeCity, TypeState, TypeYesNo, TypeCountry, } )
type StringConstraint ¶
func (*StringConstraint) Validate ¶
func (sc *StringConstraint) Validate() error
Click to show internal directories.
Click to hide internal directories.