-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Update VRL to 0.5.0
#17793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update VRL to 0.5.0
#17793
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
32948fd
update dependency
fuchsnj 645b9bd
add cue docs
fuchsnj 1450d92
spellcheck override
fuchsnj 47e19fc
fix docs
fuchsnj ea405ae
fix cue format
fuchsnj 9c1818e
fix documentation examples
fuchsnj a8d6e85
Merge branch 'master' into fuchsnj/vrl_0.5.0
fuchsnj 2ba1882
Merge remote-tracking branch 'origin/master' into fuchsnj/vrl_0.5.0
jszwedko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -411,6 +411,7 @@ timespan | |
| timestamped | ||
| tzdata | ||
| ubuntu | ||
| upstreaminfo | ||
| useragents | ||
| usergroups | ||
| userguide | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
58 changes: 58 additions & 0 deletions
58
website/cue/reference/remap/functions/from_unix_timestamp.cue
This file contains hidden or 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,58 @@ | ||
| package metadata | ||
|
|
||
| remap: functions: from_unix_timestamp: { | ||
| category: "Convert" | ||
| description: """ | ||
| Converts the `value` integer from a [Unix timestamp](\(urls.unix_timestamp)) to a VRL `timestamp`. | ||
|
|
||
| Converts from the number of seconds since the Unix epoch by default, but milliseconds or nanoseconds can also be | ||
| specified by `unit`. | ||
| """ | ||
|
|
||
| arguments: [ | ||
| { | ||
| name: "value" | ||
| description: "The Unix timestamp to convert." | ||
| required: true | ||
| type: ["integer"] | ||
| }, | ||
| { | ||
| name: "unit" | ||
| description: "The time unit." | ||
| type: ["string"] | ||
| required: false | ||
| enum: { | ||
| seconds: "Express Unix time in seconds" | ||
| milliseconds: "Express Unix time in milliseconds" | ||
| nanoseconds: "Express Unix time in nanoseconds" | ||
| } | ||
| default: "seconds" | ||
| }, | ||
| ] | ||
| internal_failure_reasons: [] | ||
| return: types: ["timestamp"] | ||
|
|
||
| examples: [ | ||
| { | ||
| title: "Convert from a Unix timestamp (seconds)" | ||
| source: #""" | ||
| from_unix_timestamp!(5) | ||
| """# | ||
| return: "1970-01-01T00:00:05Z" | ||
| }, | ||
| { | ||
| title: "Convert from a Unix timestamp (milliseconds)" | ||
| source: #""" | ||
| from_unix_timestamp(5000, unit: "milliseconds") | ||
| """# | ||
| return: "1970-01-01T00:00:05Z" | ||
| }, | ||
| { | ||
| title: "Convert from a Unix timestamp (nanoseconds)" | ||
| source: #""" | ||
| from_unix_timestamp(5000, unit: "nanoseconds") | ||
| """# | ||
| return: "1970-01-01T00:00:00.000005Z" | ||
| }, | ||
| ] | ||
| } |
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.