lucee.Componenttestbox.system.modules.mockdatacfc.models.MockData
Our Mocking Data CFC Please review the readme.md for instructions on usage.
Method Summary | |
---|---|
private any
|
generateDateRange([date from='[runtime expression]'], [date to='[runtime expression]'], [any showTime='false'], [any dateFormat='medium'], [any timeFormat='medium'])
Genereate a random data range. |
private any
|
generateEmail()
Generate an email. |
private any
|
generateFakeData(any type, any index)
Generate the fake data according to incoming type. |
private any
|
generateFirstName()
Generate a first name. |
private any
|
generateHash()
Generate a SHA-512 hash with no - dashes. |
private any
|
generateImageUrl([boolean httpOnly], [boolean httpsOnly])
Generate a random image URL including a random protocol. |
private any
|
generateIpAddress()
Generate an ip address. |
private any
|
generateLastName()
Generate a last name. |
private any
|
generateLorem(any type)
Generate Lorem. |
private struct
|
generateNewItem(array fieldModels, any index)
Generate a new mocked item. |
private any
|
generateNumber(any type)
Generate a random number. |
private any
|
generateOneOf(any type)
generate one of functions. |
private any
|
generateSentences(any type)
Generate sentences. |
private any
|
generateSSN()
Generate SSN. |
private any
|
generateString(any type)
Generate random strings. |
private any
|
generateTelephone()
Generate telephone. |
private any
|
generateUrl([boolean httpOnly], [boolean httpsOnly], [boolean imageExtensions='false'])
Generate a random URL including a random protocol. |
private any
|
generateWebsite([boolean httpOnly], [boolean httpsOnly])
Generate a random website including random protocol. |
private any
|
generateWords(any type)
Generate random words. |
private any
|
getPartCounts(any target)
Get the parts count from the incoming target type which can be. |
private boolean
|
isDefault(any target)
Check if an incoming type exists in our default types. |
remote any
|
mock()
This function is the remote entry point for our service or data calls. |
Methods inherited from class lucee.Component |
---|
None |
Method Detail |
---|
Genereate a random data range
from
- The date time startto
- The end date else defaults to todayshowTime
- Show time in the datadateFormat
- The date formatting to usetimeFormat
- The time formmating to useGenerate an email
Generate the fake data according to incoming type
type
- The valid incoming fake data typeindex
- The index location of the fake iterationGenerate a first name
Generate a SHA-512 hash with no - dashes
Generate a random image URL including a random protocol
httpOnly
- Only do http sites, mutex with httpsOnlyhttpsOnly
- Only do https sites, mutex with httpOnlyGenerate an ip address
Generate a last name
Generate Lorem
type
- The target typeGenerate a new mocked item
fieldModels
- A struct of name and type of the model to generateindex
- The numerical index of the item being generatedGenerate a random number
type
generate one of functions
type
Generate sentences
type
Generate SSN
Generate random strings
type
- This can be strings, or strings:lettersMaxGenerate telephone
Generate a random URL including a random protocol
httpOnly
- Only do http sites, mutex with httpsOnlyhttpsOnly
- Only do https sites, mutex with httpOnlyimageExtensions
Generate a random website including random protocol
httpOnly
- Only do http sites, mutex with httpsOnlyhttpsOnly
- Only do https sites, mutex with httpOnlyGenerate random words
type
- This can be words, or words:countGet the parts count from the incoming target type which can be - type:max - type:min:max
target
Check if an incoming type exists in our default types
target
- The target to checkThis function is the remote entry point for our service or data calls The incoming arguments are evaluated for mocking data services.