GoogleCloudPlatform / golang-samples

Sample apps and code written for Google Cloud in the Go programming language.
Apache License 2.0
4.29k stars 1.73k forks source link

feat(dlp): Add code sample for using REP endpoint #4299

Closed jakubrauch closed 1 month ago

jakubrauch commented 2 months ago

Description

Fixes: N/A

Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

Checklist

snippet-bot[bot] commented 2 months ago

Here is the summary of changes.

You are about to add 1 region tag. - [dlp/snippets/inspect/inspect_string_rep.go:17](https://github.com/jakubrauch/golang-samples/blob/0cacbad594497ed37e5d0f7c9e8b45e727607c74/dlp/snippets/inspect/inspect_string_rep.go#L17), tag `dlp_inspect_string_rep`

This comment is generated by snippet-bot. If you find problems with this result, please file an issue at: https://github.com/googleapis/repo-automation-bots/issues. To update this comment, add snippet-bot:force-run label or use the checkbox below:

conventional-commit-lint-gcf[bot] commented 2 months ago

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot https://conventionalcommits.org/

jakubrauch commented 2 months ago

This looks like it will need to go into a separate directory.

Why?

Is this a new feature or a new version of the API?

No changes to the API, this just shows how to use the same API through dlp..rep.googleapis.com instead of dlp.googleapis.com. Same functionality, but provides in-transit regionalization.

It's effectively the same sample as https://github.com/GoogleCloudPlatform/golang-samples/blob/main/dlp/snippets/inspect/inspect_string.go except for adding repLocation and the regional endpoint.

Correct.

jakubrauch commented 1 month ago

Thanks, updated, ptal