Skip to content
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

feat: Add new stdlib functions #2199

Merged
merged 7 commits into from
Dec 4, 2024

Conversation

ravishankar15
Copy link
Contributor

@ravishankar15 ravishankar15 commented Nov 29, 2024

PR Description

Adds two new stdlib functions to_base64 and to_URLbase64

Which issue(s) this PR fixes

#2048

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@CLAassistant
Copy link

CLAassistant commented Nov 29, 2024

CLA assistant check
All committers have signed the CLA.

"from_yaml": yamlDecode,
"from_base64": base64Decode,
"to_base64": base64Encode,
"to_URLbase64": base64URLEncode,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be an appropriate from_urlbase64?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have added the same makes sense since to have decode when we have the encode

docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
Comment on lines 32 to 33
The `encoding.to_base64` function encodes a string to RFC4648-compliant base64 string
into the original string.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `encoding.to_base64` function encodes a string to RFC4648-compliant base64 string
into the original string.
The `encoding.to_base64` function encodes a string to an RFC4648-compliant Base64 string into the original string.

The wording here seems awkward. I'm not sure how to phrase it so it's still technically correct. @mattdurham could we say something along the lines of The `encoding.to_base64` function encodes a string to an RFC4648-compliant Base64 string and writes it into the original string.? Or does it overwrite the original string? Or something else?

Copy link
Contributor Author

@ravishankar15 ravishankar15 Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope the new verbal change makes sense.

docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
@ravishankar15
Copy link
Contributor Author

Hi Team, I have addressed the review comments please take a look.

docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
docs/sources/reference/stdlib/encoding.md Outdated Show resolved Hide resolved
@clayton-cornell clayton-cornell added the type/docs Docs Squad label across all Grafana Labs repos label Dec 3, 2024
@ravishankar15
Copy link
Contributor Author

Addressed the commit suggestions

Copy link
Contributor

@clayton-cornell clayton-cornell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving for doc input. It will still need code review @mattdurham

@mattdurham
Copy link
Collaborator

LGTM thanks for the PR!

@mattdurham mattdurham merged commit cee4ab8 into grafana:main Dec 4, 2024
14 of 15 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age type/docs Docs Squad label across all Grafana Labs repos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants