Documentation ¶
Overview ¶
Provides utility functions for marshaling and unmarshaling values for storage in DynamoDB with the official client.
Index ¶
- func FormatDuration(d time.Duration) *dynamodb.AttributeValue
- func FormatInt(i int) *dynamodb.AttributeValue
- func FormatString(s string) *dynamodb.AttributeValue
- func FormatTime(t time.Time) *dynamodb.AttributeValue
- func IsConditionFailed(err error) bool
- func ParseDuration(v *dynamodb.AttributeValue) (time.Duration, error)
- func ParseInt(v *dynamodb.AttributeValue) (int, error)
- func ParseString(v *dynamodb.AttributeValue) string
- func ParseTime(v *dynamodb.AttributeValue) (time.Time, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDuration ¶
func FormatDuration(d time.Duration) *dynamodb.AttributeValue
FormatDuration converts a time.Duration to an *AttributeValue number.
func FormatInt ¶
func FormatInt(i int) *dynamodb.AttributeValue
FormatInt converts an int to an *AttributeValue.
func FormatString ¶
func FormatString(s string) *dynamodb.AttributeValue
FormatString converts a string to an *AttributeValue.
func FormatTime ¶
func FormatTime(t time.Time) *dynamodb.AttributeValue
FormatTime converts a time to an *AttributeValue. The time is stored as an integer representing nanoseconds since epoch, and is not necessarily compatible with other serializations.
func IsConditionFailed ¶
IsConditionalCheckFailed returns true if an error is an awserr.Error with code "CondtionalCheckFailedException"
func ParseDuration ¶
func ParseDuration(v *dynamodb.AttributeValue) (time.Duration, error)
func ParseInt ¶
func ParseInt(v *dynamodb.AttributeValue) (int, error)
ParseInt converts an *AttributeValue to an int.
func ParseString ¶
func ParseString(v *dynamodb.AttributeValue) string
FormatString converts an AttributeValue to a string.
Types ¶
This section is empty.