fakedata

package
v0.0.0-...-0751cc3 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidFakeDataAddress

func IsValidFakeDataAddress(address string) (bool, error)

IsValidFakeDataAddress checks the that the address can be found in the fake data. If the address is found true is returned, if not found, false is returned.

This function will compare using case insensitive comparison, but spaces and all characters not in the range a-z, A-Z, 0-9 will be removed and not used in the comparison. This will allow forgiveness of use of spaces, ',', '#' etc and other non alphabet characters.

func IsValidFakeDataAddressStrict

func IsValidFakeDataAddressStrict(address string) (bool, error)

IsValidFakeDataAddressStrict checks the that the address can be found in the fake data. If the address is found true is returned, if not found, false is returned.

This function will compare using case insensitive comparison, but spaces and all characters will be compared.

func IsValidFakeDataEmail

func IsValidFakeDataEmail(email string) (bool, error)

IsValidFakeDataEmail - checks for the format @truss.works or @example.com or @email.com

func IsValidFakeDataFullName

func IsValidFakeDataFullName(firstName string, lastName string) (bool, error)

IsValidFakeDataFullName checks the first name and last name can be found in the fake data. If the name is found true is returned, if not found, false is returned.

This function will compare using case insensitive comparison, but spaces and all characters not in the range a-z, A-Z, 0-9 will be removed and not used in the comparison. This will allow forgiveness of use of spaces, ',', '#' etc and other non alphabet characters.

func IsValidFakeDataFullNameStrict

func IsValidFakeDataFullNameStrict(firstName string, lastName string) (bool, error)

IsValidFakeDataFullNameStrict checks the first name and last name can be found in the fake data. If the name is found true is returned, if not found, false is returned.

This function will compare using case insensitive comparison, but spaces and all characters will be compared.

func IsValidFakeDataName

func IsValidFakeDataName(name string) (bool, error)

IsValidFakeDataName checks the name can be found in the fake data. If the name is found true is returned, if not found, false is returned. Name is assumed to be `firstName lastName`

This function will compare using case insensitive comparison, but spaces and all characters not in the range a-z, A-Z, 0-9 will be removed and not used in the comparison. This will allow forgiveness of use of spaces, ',', '#' etc and other non alphabet characters.

func IsValidFakeDataPhone

func IsValidFakeDataPhone(phone string) (bool, error)

IsValidFakeDataPhone - checks for the format

"999-999-999" or
"###-555-####"

func RandomName

func RandomName() (first string, last string)

RandomName - randomly selects a name from the fakeNames slice and returns the first and last name "Jason", "Ash"

func RandomStreetAddress

func RandomStreetAddress() string

RandomStreetAddress - randomly selects a street address from the fakeAddress slice

Types

This section is empty.

Jump to

Keyboard shortcuts

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