-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
69861f4
commit bab645d
Showing
4 changed files
with
102 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
title: Random String | ||
id: random-string | ||
hide_title: true | ||
slug: /transformers/system/random-string | ||
--- | ||
|
||
import { TransformerPageHeader } from '@site/src/CustomComponents/TransformerPageHeader.tsx'; | ||
|
||
import { DocsTable } from '@site/src/CustomComponents/DocsTable.tsx'; | ||
|
||
<TransformerPageHeader | ||
title="Random String" | ||
type="string" | ||
apiRef="https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/random_string.go" | ||
/> | ||
|
||
## Definition | ||
|
||
The random string transformer generates a random string of alphanumeric characters. | ||
|
||
For example: | ||
`h2983hf28h92` | ||
|
||
By default, the random string transformer generates a string of 10 characters long. | ||
|
||
## Configurations | ||
|
||
Depending on your validations, you may want to configure the output string. The random string transformer has the following configurations: | ||
|
||
<DocsTable | ||
headers={[ | ||
'Name', | ||
'Description', | ||
'Default', | ||
'Example Input', | ||
'Example Output', | ||
]} | ||
rowData={[ | ||
{ | ||
data: [ | ||
'Preserve Length', | ||
'Preserves the length of the input integer to the output integer.', | ||
'false', | ||
'hello', | ||
'9Fau3', | ||
], | ||
}, | ||
{ | ||
data: [ | ||
'String Length', | ||
'Specifies how many digits you want the string to be. There is no defined max length that a string can be. ', | ||
'10', | ||
'6', | ||
'noIB8a', | ||
], | ||
}, | ||
]} | ||
/> | ||
|
||
## Examples | ||
|
||
There are several ways you can mix-and-match configurations to get different potential random integer formats. Here are some possible combinations: | ||
|
||
<DocsTable | ||
headers={[ | ||
'PreserveLength', | ||
'String Length', | ||
'Example Input', | ||
'Example Output', | ||
]} | ||
rowData={[ | ||
{ | ||
data: ['false', '5', 'bill', 'je7R6'], | ||
}, | ||
{ | ||
data: ['true', 'N/A', 'lorem', 'i1NMe'], | ||
}, | ||
{ | ||
data: ['false', 'N/A', 'ipsum', 'Hinw2'], | ||
}, | ||
]} | ||
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters