Documentation ¶
Index ¶
- func AllQuery(ctx context.Context, client DYQueryAPI, table *string, ...) ([]map[string]types.AttributeValue, error)
- func PutItem(ctx context.Context, Client DyPutItemAPI, table *string, data DYPayload) error
- func UpdateItem(ctx context.Context, Client DYUpdateItemAPI, table *string, ...) error
- type DYPayload
- type DYPayloads
- type DYQueryAPI
- type DYUpdateItemAPI
- type DyPutItemAPI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllQuery ¶
func AllQuery(ctx context.Context, client DYQueryAPI, table *string, keyCondition expression.KeyConditionBuilder, filter ...expression.ConditionBuilder) ([]map[string]types.AttributeValue, error)
AllQuery will accept at most one filter
func UpdateItem ¶
func UpdateItem(ctx context.Context, Client DYUpdateItemAPI, table *string, key map[string]types.AttributeValue, field expression.UpdateBuilder) error
Types ¶
type DYPayload ¶
type DYPayload interface {
DynamodbData() (map[string]types.AttributeValue, error)
}
DYPayload defines a common interface for data processing
type DYPayloads ¶
type DYPayloads interface {
Payloads() ([]map[string]types.AttributeValue, error)
}
DYPayloads defines a common interface for batch data processing
type DYQueryAPI ¶
type DYQueryAPI interface {
Query(ctx context.Context, params *dynamodb.QueryInput, optFns ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error)
}
DYQueryAPI used to prepare unit test
type DYUpdateItemAPI ¶
type DYUpdateItemAPI interface {
UpdateItem(ctx context.Context, params *dynamodb.UpdateItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error)
}
type DyPutItemAPI ¶
type DyPutItemAPI interface {
PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
}
DyPutItemAPI func
Click to show internal directories.
Click to hide internal directories.