-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DynamoDB] refactor!: Use dynamodbattribute for Unmarshal; Add Descri…
…beTable; (#48)
- Loading branch information
1 parent
7e6b504
commit 0e131ae
Showing
14 changed files
with
862 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// DynamoDB utility | ||
|
||
package dynamodb | ||
|
||
import ( | ||
SDK "github.com/aws/aws-sdk-go/service/dynamodb" | ||
) | ||
|
||
const ( | ||
// attribvute types | ||
AttributeTypeString = "S" | ||
AttributeTypeNumber = "N" | ||
AttributeTypeBinary = "B" | ||
AttributeTypeBool = "BOOL" | ||
AttributeTypeNull = "NULL" | ||
AttributeTypeMap = "M" | ||
AttributeTypeList = "L" | ||
AttributeTypeStringSet = "SS" | ||
AttributeTypeNumberSet = "NS" | ||
AttributeTypeBinarySet = "BS" | ||
|
||
conditionEQ = "=" | ||
conditionLE = "<=" | ||
conditionLT = "<" | ||
conditionGE = ">=" | ||
conditionGT = ">" | ||
conditionBETWEEN = SDK.ComparisonOperatorBetween | ||
conditionOR = SDK.ConditionalOperatorOr | ||
conditionAND = SDK.ConditionalOperatorAnd | ||
|
||
// comparison operators | ||
ComparisonOperatorEQ = SDK.ComparisonOperatorEq | ||
ComparisonOperatorNE = "NE" | ||
ComparisonOperatorGT = "GT" | ||
ComparisonOperatorLT = "LT" | ||
ComparisonOperatorGE = "GE" | ||
ComparisonOperatorLE = "LE" | ||
|
||
// key type name for DynamoDB Index. | ||
KeyTypeHash = SDK.KeyTypeHash | ||
KeyTypeRange = SDK.KeyTypeRange | ||
|
||
SelectCount = SDK.SelectCount | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.