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

chore(examples): Add examples for Go with CI #733

Merged
merged 13 commits into from
Jan 9, 2025

Conversation

rishav-karanjit
Copy link
Member

@rishav-karanjit rishav-karanjit commented Jan 3, 2025

Issue #, if available:

Description of changes:
Moving all examples from here which is already PR reviewed to this repo but did following changes while moving:

  • Moved commitmentpolicy.go, limitencrypteddatakeysexample.go and setencryptionalgorithmsuite.go files to the misc directory to improve code organization, as these auxiliary examples are better separated from the core project files (main.go, go.mod and go.sum).
  • Removed get in getters https://go.dev/doc/effective_go/#Getters. In here: 6487e76
  • Added readme (AwsEncryptionSDK/runtimes/go/examples/readme.md)

Squash/merge commit message, if applicable:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@rishav-karanjit rishav-karanjit changed the title chore(examples): Add examples for Go with CI running the examples chore(examples): Add examples for Go with CI running the examples Jan 3, 2025
@rishav-karanjit rishav-karanjit changed the title chore(examples): Add examples for Go with CI running the examples chore(examples): Add examples for Go with CI Jan 3, 2025
@rishav-karanjit rishav-karanjit marked this pull request as ready for review January 3, 2025 23:50
@rishav-karanjit rishav-karanjit requested a review from a team as a code owner January 3, 2025 23:50
Copy link
Contributor

@lucasmcdonald3 lucasmcdonald3 left a comment

Choose a reason for hiding this comment

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

Just a few README nits, otherwise LGTM

@@ -0,0 +1,90 @@
# AWS Encryption SDK for Go Examples
Copy link
Contributor

Choose a reason for hiding this comment

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

Rename this file to README.md

Copy link
Member Author

Choose a reason for hiding this comment

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

Done


The AWS Encryption SDK provides two high-level APIs:
one-step APIs that process the entire operation in memory
and streaming APIs.
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't find the streaming API examples -- if it's just 1 or 2 examples could you link them specifically?
(I'm also surprised to hear this -- I was also under the impression that our Dafny libraries wouldn't support streaming until Dafny did some work. Did that get done?)

Copy link
Member Author

Choose a reason for hiding this comment

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

No. This came in when I copied the readme from other runtimes. I think we don't support streaming rn.

* How to restrict algorithm suites
* [with a custom cryptographic materials manager](./cryptographicmaterialsmanager/restrictalgorithmsuite/signingsuiteonlycmm.go)

### Keyrings
Copy link
Contributor

Choose a reason for hiding this comment

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

They determine how the AWS Encryption SDK protects your data.
You can find these examples in [`examples/keyring`](./keyring).

### Cryptographic Materials Managers
Copy link
Contributor

Choose a reason for hiding this comment

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

lucasmcdonald3
lucasmcdonald3 previously approved these changes Jan 8, 2025
Copy link
Contributor

@lucasmcdonald3 lucasmcdonald3 left a comment

Choose a reason for hiding this comment

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

My README nits apply to all languages, will be addressed in alter PR

Comment on lines 111 to 112
_polymorph_dependencies:
@echo "No polymorphing of dependency"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be left in?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ohh no. I forgot to remove it. Thats my faster polymorph'ing trick

@rishav-karanjit rishav-karanjit merged commit c3ba5e3 into mainline Jan 9, 2025
84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants