-
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
bab645d
commit 618a921
Showing
7 changed files
with
174 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
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,42 @@ | ||
--- | ||
title: State | ||
id: state | ||
hide_title: true | ||
slug: /transformers/system/state | ||
--- | ||
|
||
import { TransformerPageHeader } from '@site/src/CustomComponents/TransformerPageHeader.tsx'; | ||
|
||
import { DocsTable } from '@site/src/CustomComponents/DocsTable.tsx'; | ||
|
||
<TransformerPageHeader | ||
title="State" | ||
type="string" | ||
apiRef="https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/state.go" | ||
/> | ||
|
||
## Definition | ||
|
||
The state transformer generates a randomly selected US state. You can see the complete list of cities that are available to be randomly selected [here.](https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/data-sets/addresses.json). | ||
|
||
If you'd rather not get back a real state value, you can use the [Random String Transformer](/transformers/system/random-string) to generate a random string value. | ||
|
||
## Configurations | ||
|
||
There are no configurations for the state transformer. | ||
|
||
## Examples | ||
|
||
Here are some examples of what an output state value may look like. | ||
|
||
<DocsTable | ||
headers={['Example Input', 'Example Output']} | ||
rowData={[ | ||
{ | ||
data: ['Massachusetts', 'Rhode Island'], | ||
}, | ||
{ | ||
data: ['California', 'Missouri'], | ||
}, | ||
]} | ||
/> |
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,43 @@ | ||
--- | ||
title: Street Address | ||
id: street-address | ||
hide_title: true | ||
slug: /transformers/system/street-address | ||
--- | ||
|
||
import { TransformerPageHeader } from '@site/src/CustomComponents/TransformerPageHeader.tsx'; | ||
|
||
import { DocsTable } from '@site/src/CustomComponents/DocsTable.tsx'; | ||
|
||
<TransformerPageHeader | ||
title="Street Address" | ||
type="string" | ||
apiRef="https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/street_address.go" | ||
/> | ||
|
||
## Definition | ||
|
||
The street address transformer generates a randomly selects a real street address that exists in the United States. You can see the complete list of street addresses that are available to be randomly selected [here.](https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/data-sets/addresses.json). | ||
|
||
The street address transformer returns a valid United States address. For example: | ||
`123 Main Street Boston` | ||
|
||
## Configurations | ||
|
||
There are no configurations for the street adddress transformer. | ||
|
||
## Examples | ||
|
||
Here are some examples of what an output street address value may look like. | ||
|
||
<DocsTable | ||
headers={['Example Input', 'Example Output']} | ||
rowData={[ | ||
{ | ||
data: ['N/A', '509 Franklin Street Northeast'], | ||
}, | ||
{ | ||
data: ['San Francisco', '14 Huntingon Street'], | ||
}, | ||
]} | ||
/> |
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,63 @@ | ||
--- | ||
title: Unix Timestamp | ||
id: unix-ts | ||
hide_title: true | ||
slug: /transformers/system/unix-ts | ||
--- | ||
|
||
import { TransformerPageHeader } from '@site/src/CustomComponents/TransformerPageHeader.tsx'; | ||
|
||
import { DocsTable } from '@site/src/CustomComponents/DocsTable.tsx'; | ||
|
||
<TransformerPageHeader | ||
title="Unix Timestamp" | ||
type="int64" | ||
apiRef="https://github.com/nucleuscloud/neosync/blob/main/worker/internal/benthos/transformers/unix_timestamp.go" | ||
/> | ||
|
||
## Definition | ||
|
||
The unix timestamp transformer randomly generates a unix timestamp in UTC timezone and returns back an int64 representation of that timestamp. | ||
|
||
By default, the generated timestamp will always be in the **past**. To generate a timestamp that is in the future, set the `alwaysFuture` config to true. | ||
|
||
## Configurations | ||
|
||
Depending on your validations, you may want to configure the output unix timestamp. The unix timestamp transformer has the following configuration options: | ||
|
||
<DocsTable | ||
headers={[ | ||
'Name', | ||
'Description', | ||
'Default', | ||
'Example Input', | ||
'Example Output', | ||
]} | ||
rowData={[ | ||
{ | ||
data: [ | ||
'Always Future', | ||
'Always generates a timestamp in the future', | ||
'false', | ||
'N/A', | ||
'2524608000', | ||
], | ||
}, | ||
]} | ||
/> | ||
|
||
## Examples | ||
|
||
Here are some examples of what an output state value may look like. | ||
|
||
<DocsTable | ||
headers={['Always Future', 'Example Input', 'Example Output']} | ||
rowData={[ | ||
{ | ||
data: ['true', '946684800', '2524608000'], | ||
}, | ||
{ | ||
data: ['false', '761684800', '946684800'], | ||
}, | ||
]} | ||
/> |
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