Documentation ¶
Index ¶
- func ConvertEventsAttributeValue(v events.DynamoDBAttributeValue) *dynamodb.AttributeValue
- func ConvertEventsAttributeValueMap(m map[string]events.DynamoDBAttributeValue) map[string]*dynamodb.AttributeValue
- func New(cfg iaws.Config) *dynamodb.DynamoDB
- type API
- func (a *API) BatchPutItem(ctx aws.Context, table string, items []map[string]*dynamodb.AttributeValue) (resp *dynamodb.BatchWriteItemOutput, err error)
- func (a *API) GetItem(ctx aws.Context, table string, attributes map[string]interface{}, ...) (resp *dynamodb.GetItemOutput, err error)
- func (a *API) IsEnabled() bool
- func (a *API) PutItem(ctx aws.Context, table string, item map[string]*dynamodb.AttributeValue) (resp *dynamodb.PutItemOutput, err error)
- func (a *API) Query(ctx aws.Context, table, partitionKey, sortKey, keyConditionExpression string, ...) (resp *dynamodb.QueryOutput, err error)
- func (a *API) Setup(cfg iaws.Config)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertEventsAttributeValue ¶ added in v0.9.1
func ConvertEventsAttributeValue(v events.DynamoDBAttributeValue) *dynamodb.AttributeValue
ConvertEventsAttributeValue converts events.DynamoDBAttributeValue to dynamodb.AttributeValue.
func ConvertEventsAttributeValueMap ¶ added in v0.9.1
func ConvertEventsAttributeValueMap(m map[string]events.DynamoDBAttributeValue) map[string]*dynamodb.AttributeValue
ConvertEventsAttributeValueMap converts a map of events.DynamoDBAttributeValue to a map of dynamodb.AttributeValue.
Types ¶
type API ¶
type API struct {
Client dynamodbiface.DynamoDBAPI
}
API wraps the DynamoDB API interface.
func (*API) BatchPutItem ¶ added in v1.0.0
func (a *API) BatchPutItem(ctx aws.Context, table string, items []map[string]*dynamodb.AttributeValue) (resp *dynamodb.BatchWriteItemOutput, err error)
BatchPutItem is a convenience wrapper for putting multiple items into a DynamoDB table.
func (*API) GetItem ¶ added in v0.8.1
func (a *API) GetItem(ctx aws.Context, table string, attributes map[string]interface{}, consistentRead bool) (resp *dynamodb.GetItemOutput, err error)
GetItem is a convenience wrapper for getting items into a DynamoDB table.
func (*API) PutItem ¶
func (a *API) PutItem(ctx aws.Context, table string, item map[string]*dynamodb.AttributeValue) (resp *dynamodb.PutItemOutput, err error)
PutItem is a convenience wrapper for putting items into a DynamoDB table.
func (*API) Query ¶
func (a *API) Query(ctx aws.Context, table, partitionKey, sortKey, keyConditionExpression string, limit int64, scanIndexForward bool) (resp *dynamodb.QueryOutput, err error)
Query is a convenience wrapper for querying a DynamoDB table. The paritition and sort keys are always referenced in the key condition expression as ":PK" and ":SK". Refer to the DynamoDB documentation for the Query operation's request syntax and key condition expression patterns: