|
4 | 4 | package main |
5 | 5 |
|
6 | 6 | import ( |
| 7 | + "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/clientsupplier" |
| 8 | + "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/itemencryptor" |
| 9 | + "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/keyring" |
7 | 10 | "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/migration/PlaintextToAWSDBE/awsdbe" |
8 | 11 | "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/migration/PlaintextToAWSDBE/plaintext" |
| 12 | + "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/misc" |
| 13 | + "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/searchableencryption" |
| 14 | + "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/searchableencryption/complexexample" |
9 | 15 | "github.com/aws/aws-database-encryption-sdk-dynamodb/releases/go/dynamodb-esdk/examples/utils" |
10 | 16 | "github.com/google/uuid" |
11 | 17 | ) |
12 | 18 |
|
13 | 19 | func main() { |
14 | | - // // clientsupplier example |
15 | | - // clientsupplier.ClientSupplierExample( |
16 | | - // utils.DdbTableName(), |
17 | | - // utils.TestMrkReplicaKeyIdUsEast1(), |
18 | | - // utils.DefaultKMSKeyAccountID(), |
19 | | - // utils.AlternateRegionKmsKeyRegionAsAList()) |
20 | | - // // misc examples |
21 | | - // misc.BasicPutGetExample( |
22 | | - // utils.KmsKeyID(), |
23 | | - // utils.DdbTableName()) |
24 | | - // misc.GetEncryptedDataKeyDescriptionExample( |
25 | | - // utils.KmsKeyID(), |
26 | | - // utils.DdbTableName()) |
27 | | - // misc.MultiPutGetExample( |
28 | | - // utils.KmsKeyID(), |
29 | | - // utils.DdbTableName()) |
30 | | - // branchKey1 := misc.CreateBranchKeyIDExample( |
31 | | - // utils.TestKeystoreName(), |
32 | | - // utils.TestLogicalKeystoreName(), |
33 | | - // utils.TestKeystoreKmsKeyId()) |
34 | | - // branchKey2 := misc.CreateBranchKeyIDExample( |
35 | | - // utils.TestKeystoreName(), |
36 | | - // utils.TestLogicalKeystoreName(), |
37 | | - // utils.TestKeystoreKmsKeyId()) |
| 20 | + // clientsupplier example |
| 21 | + clientsupplier.ClientSupplierExample( |
| 22 | + utils.DdbTableName(), |
| 23 | + utils.TestMrkReplicaKeyIdUsEast1(), |
| 24 | + utils.DefaultKMSKeyAccountID(), |
| 25 | + utils.AlternateRegionKmsKeyRegionAsAList()) |
| 26 | + // misc examples |
| 27 | + misc.BasicPutGetExample( |
| 28 | + utils.KmsKeyID(), |
| 29 | + utils.DdbTableName()) |
| 30 | + misc.GetEncryptedDataKeyDescriptionExample( |
| 31 | + utils.KmsKeyID(), |
| 32 | + utils.DdbTableName()) |
| 33 | + misc.MultiPutGetExample( |
| 34 | + utils.KmsKeyID(), |
| 35 | + utils.DdbTableName()) |
| 36 | + branchKey1 := misc.CreateBranchKeyIDExample( |
| 37 | + utils.TestKeystoreName(), |
| 38 | + utils.TestLogicalKeystoreName(), |
| 39 | + utils.TestKeystoreKmsKeyId()) |
| 40 | + branchKey2 := misc.CreateBranchKeyIDExample( |
| 41 | + utils.TestKeystoreName(), |
| 42 | + utils.TestLogicalKeystoreName(), |
| 43 | + utils.TestKeystoreKmsKeyId()) |
38 | 44 |
|
39 | | - // // keyring examples |
40 | | - // keyring.AwsKmsKeyringExample( |
41 | | - // utils.KmsKeyID(), |
42 | | - // utils.DdbTableName()) |
43 | | - // keyring.RawAesExample( |
44 | | - // utils.DdbTableName(), |
45 | | - // utils.KeyNamespace(), |
46 | | - // utils.KeyName(), |
47 | | - // utils.GenerateAes256KeyBytes()) |
48 | | - // keyring.HierarchicalKeyringExample( |
49 | | - // utils.DdbTableName(), |
50 | | - // branchKey1, |
51 | | - // branchKey2, |
52 | | - // utils.TestKeystoreName(), |
53 | | - // utils.TestLogicalKeystoreName(), |
54 | | - // utils.TestKeystoreKmsKeyId()) |
55 | | - // keyring.KmsRsaKeyringExample( |
56 | | - // utils.DdbTableName(), |
57 | | - // utils.TestKmsRsaKeyID(), |
58 | | - // utils.DefaultRsaPublicKeyFilename()) |
59 | | - // keyring.RawRsaKeyringExample( |
60 | | - // utils.DdbTableName(), |
61 | | - // utils.ExampleRsaPublicKeyFilename(), |
62 | | - // utils.ExampleRsaPrivateKeyFilename()) |
63 | | - // keyring.MrkDiscoveryMultiKeyringExample( |
64 | | - // utils.KmsKeyID(), |
65 | | - // utils.DdbTableName(), |
66 | | - // utils.DefaultKMSKeyAccountID(), |
67 | | - // utils.DefaultKmsKeyRegion()) |
| 45 | + // keyring examples |
| 46 | + keyring.AwsKmsKeyringExample( |
| 47 | + utils.KmsKeyID(), |
| 48 | + utils.DdbTableName()) |
| 49 | + keyring.RawAesExample( |
| 50 | + utils.DdbTableName(), |
| 51 | + utils.KeyNamespace(), |
| 52 | + utils.KeyName(), |
| 53 | + utils.GenerateAes256KeyBytes()) |
| 54 | + keyring.HierarchicalKeyringExample( |
| 55 | + utils.DdbTableName(), |
| 56 | + branchKey1, |
| 57 | + branchKey2, |
| 58 | + utils.TestKeystoreName(), |
| 59 | + utils.TestLogicalKeystoreName(), |
| 60 | + utils.TestKeystoreKmsKeyId()) |
| 61 | + keyring.KmsRsaKeyringExample( |
| 62 | + utils.DdbTableName(), |
| 63 | + utils.TestKmsRsaKeyID(), |
| 64 | + utils.DefaultRsaPublicKeyFilename()) |
| 65 | + keyring.RawRsaKeyringExample( |
| 66 | + utils.DdbTableName(), |
| 67 | + utils.ExampleRsaPublicKeyFilename(), |
| 68 | + utils.ExampleRsaPrivateKeyFilename()) |
| 69 | + keyring.MrkDiscoveryMultiKeyringExample( |
| 70 | + utils.KmsKeyID(), |
| 71 | + utils.DdbTableName(), |
| 72 | + utils.DefaultKMSKeyAccountID(), |
| 73 | + utils.DefaultKmsKeyRegion()) |
68 | 74 |
|
69 | | - // // item encryptor example |
70 | | - // itemencryptor.ItemEncryptDecryptExample( |
71 | | - // utils.KmsKeyID(), |
72 | | - // utils.DdbTableName()) |
| 75 | + // item encryptor example |
| 76 | + itemencryptor.ItemEncryptDecryptExample( |
| 77 | + utils.KmsKeyID(), |
| 78 | + utils.DdbTableName()) |
73 | 79 |
|
74 | | - // // searchable encryption example |
75 | | - // searchableencryption.BasicSearchableEncryptionExample( |
76 | | - // utils.UnitInspectionTestDdbTableName(), |
77 | | - // branchKey1, |
78 | | - // utils.TestKeystoreKmsKeyId(), |
79 | | - // utils.TestKeystoreName()) |
80 | | - // searchableencryption.BeaconStylesSearchableEncryptionExample( |
81 | | - // utils.UnitInspectionTestDdbTableName(), |
82 | | - // branchKey1, |
83 | | - // utils.TestKeystoreKmsKeyId(), |
84 | | - // utils.TestKeystoreName()) |
85 | | - // searchableencryption.CompoundBeaconSearchableEncryptionExample( |
86 | | - // utils.UnitInspectionTestDdbTableName(), |
87 | | - // branchKey2, |
88 | | - // utils.TestKeystoreKmsKeyId(), |
89 | | - // utils.TestKeystoreName()) |
90 | | - // searchableencryption.VirtualBeaconSearchableEncryptionExample( |
91 | | - // utils.SimpleBeaconTestDdbTableName(), |
92 | | - // branchKey2, |
93 | | - // utils.TestKeystoreKmsKeyId(), |
94 | | - // utils.TestKeystoreName()) |
95 | | - // complexexample.ComplexSearchableEncryptionExample( |
96 | | - // utils.TestComplexDdbTableName(), |
97 | | - // branchKey1, |
98 | | - // utils.TestKeystoreKmsKeyId(), |
99 | | - // utils.TestKeystoreName()) |
| 80 | + // searchable encryption example |
| 81 | + searchableencryption.BasicSearchableEncryptionExample( |
| 82 | + utils.UnitInspectionTestDdbTableName(), |
| 83 | + branchKey1, |
| 84 | + utils.TestKeystoreKmsKeyId(), |
| 85 | + utils.TestKeystoreName()) |
| 86 | + searchableencryption.BeaconStylesSearchableEncryptionExample( |
| 87 | + utils.UnitInspectionTestDdbTableName(), |
| 88 | + branchKey1, |
| 89 | + utils.TestKeystoreKmsKeyId(), |
| 90 | + utils.TestKeystoreName()) |
| 91 | + searchableencryption.CompoundBeaconSearchableEncryptionExample( |
| 92 | + utils.UnitInspectionTestDdbTableName(), |
| 93 | + branchKey2, |
| 94 | + utils.TestKeystoreKmsKeyId(), |
| 95 | + utils.TestKeystoreName()) |
| 96 | + searchableencryption.VirtualBeaconSearchableEncryptionExample( |
| 97 | + utils.SimpleBeaconTestDdbTableName(), |
| 98 | + branchKey2, |
| 99 | + utils.TestKeystoreKmsKeyId(), |
| 100 | + utils.TestKeystoreName()) |
| 101 | + complexexample.ComplexSearchableEncryptionExample( |
| 102 | + utils.TestComplexDdbTableName(), |
| 103 | + branchKey1, |
| 104 | + utils.TestKeystoreKmsKeyId(), |
| 105 | + utils.TestKeystoreName()) |
100 | 106 |
|
101 | 107 | // migration examples |
102 | 108 | partitionKeyValue := uuid.New().String() |
|
0 commit comments