Skip to content

Commit 2eb153f

Browse files
auto commit
1 parent ec03d73 commit 2eb153f

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

Examples/runtimes/go/searchableencryption/complexexample/beaconConfig.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,12 @@ import (
3333
* our workshop using the encryption client.
3434
*/
3535

36-
func SetupBeaconConfig(ctx context.Context, ddbTableName, branchKeyId, branchKeyWrappingKmsKeyArn, branchKeyDdbTableName string) (*dynamodb.Client, error) {
36+
func SetupBeaconConfig(
37+
ctx context.Context,
38+
ddbTableName,
39+
branchKeyId,
40+
branchKeyWrappingKmsKeyArn,
41+
branchKeyDdbTableName string) (*dynamodb.Client, error) {
3742
// 1. Create Keystore and branch key.
3843
// These are the same constructions as in the Basic examples, which describe this in more detail.
3944
cfg, err := config.LoadDefaultConfig(ctx)
@@ -64,7 +69,7 @@ func SetupBeaconConfig(ctx context.Context, ddbTableName, branchKeyId, branchKey
6469
// For this example, we use a standard beacon length of 4.
6570
// The BasicSearchableEncryptionExample gives a more thorough consideration of beacon length.
6671
// For production applications, one should always exercise rigor when deciding beacon length, including
67-
// examining population size and considering performance.
72+
// examining population size and considering performance.
6873
standardBeaconList := []dbesdkdynamodbencryptiontypes.StandardBeacon{
6974
{Name: "EmployeeID", Length: 4},
7075
{Name: "TicketNumber", Length: 4},
@@ -109,7 +114,7 @@ func SetupBeaconConfig(ctx context.Context, ddbTableName, branchKeyId, branchKey
109114
// These are unencrypted attributes we would like to use in beacon queries.
110115
// In this example, all of these represent dates or times.
111116
// Keeping these attributes unencrypted allows us to use them in comparison-based queries. If a signed
112-
// part is the first part in a compound beacon, then that part can be used in comparison for sorting.
117+
// part is the first part in a compound beacon, then that part can be used in comparison for sorting.
113118
signedPartList := []dbesdkdynamodbencryptiontypes.SignedPart{
114119
{Name: "TicketModTime", Prefix: "M-"},
115120
{Name: "MeetingStart", Prefix: "MS-"},

Examples/runtimes/go/searchableencryption/complexexample/complexsearchableencryptionexample.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ import (
1010
"github.com/aws/aws-database-encryption-sdk-dynamodb/examples/utils"
1111
)
1212

13+
/*
14+
* This file is used in an example to demonstrate complex queries
15+
* you can perform using beacons.
16+
* The example data used is for demonstrative purposes only,
17+
* and might not meet the distribution and correlation uniqueness
18+
* recommendations for beacons.
19+
* See our documentation for whether beacons are
20+
* right for your particular data set:
21+
* https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me
22+
*/
1323
func ComplexSearchableEncryptionExample(
1424
ddbTableName,
1525
branchKeyId,

Examples/runtimes/go/searchableencryption/complexexample/putRequests.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
* right for your particular data set:
2121
* https://docs.aws.amazon.com/database-encryption-sdk/latest/devguide/searchable-encryption.html#are-beacons-right-for-me
2222
*
23-
* This class implements PutItem calls to populate a DDB table with items from our workshop.
23+
* This file implements PutItem calls to populate a DDB table with items from our workshop.
2424
* By providing a DynamoDbClient that is configured to use searchable encryption,
25-
* this class will encrypt the data client side and add beacon attributes to the items.
25+
* this file will encrypt the data client side and add beacon attributes to the items.
2626
* This only implements a single item of each of the 6 record types from Demo.md. Adding the remaining
2727
* items would extend the test and example coverage.
2828
*/
@@ -65,7 +65,7 @@ func listAttr(l []types.AttributeValue) types.AttributeValue {
6565
return &types.AttributeValueMemberL{Value: l}
6666
}
6767

68-
// emeeting.json
68+
// meeting.json
6969
// PutAllMeetingItemsToTable puts all meeting items to the table
7070
func PutAllMeetingItemsToTable(ctx context.Context, ddbTableName string, ddb *dynamodb.Client) error {
7171
// Meeting 1

0 commit comments

Comments
 (0)