Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConditionInput ¶
type ConditionInput struct {
ConditionError error
}
ConditionInput allows working with condition expressions
func (*ConditionInput) SetConditionError ¶
func (ci *ConditionInput) SetConditionError(err error)
SetConditionError configures the err that returns
type Delete ¶
type Delete struct { ConditionInput ExpressionHolder dynamodb.DeleteItemInput PrimaryKey interface{} }
Delete holds configuration for a delete
func (*Delete) Execute ¶
func (inp *Delete) Execute(db dynamodbiface.DynamoDBAPI) (err error)
Execute will delete an item with the background context
func (*Delete) ExecuteWithContext ¶
func (inp *Delete) ExecuteWithContext(ctx aws.Context, db dynamodbiface.DynamoDBAPI) (err error)
ExecuteWithContext will delete an item from by its primary key
type ExpressionHolder ¶
type ExpressionHolder struct { ExpAttrNames map[string]string ExpAttrValues map[string]interface{} }
ExpressionHolder makes working with expression attributes easier
func (*ExpressionHolder) AddExpressionName ¶
func (eh *ExpressionHolder) AddExpressionName(placeholder, name string)
AddExpressionName adds an dynamo expression name
func (*ExpressionHolder) AddExpressionValue ¶
func (eh *ExpressionHolder) AddExpressionValue(placeholder string, val interface{})
AddExpressionValue adds an dynamo expression value
type Get ¶
type Get struct { ExpressionHolder dynamodb.GetItemInput ItemNilError error PrimaryKey interface{} }
Get holds configuration for getting an item
func (*Get) Execute ¶
func (inp *Get) Execute(db dynamodbiface.DynamoDBAPI, item interface{}) (err error)
Execute will get an item with the background context
func (*Get) ExecuteWithContext ¶
func (inp *Get) ExecuteWithContext(ctx aws.Context, db dynamodbiface.DynamoDBAPI, item interface{}) (err error)
ExecuteWithContext will retrieve a specific item from a DynamoDB table by its primary key
func (*Get) SetItemNilError ¶
SetItemNilError allows for configured the error (if any) when nothing is found
type PagingInput ¶
type PagingInput struct {
MaxPages int
}
PagingInput is used when paging can be configured
func (*PagingInput) SetMaxPages ¶
func (pi *PagingInput) SetMaxPages(n int)
SetMaxPages limits the number of pages returned
type Put ¶
type Put struct { ExpressionHolder dynamodb.PutItemInput ConditionInput Item interface{} }
Put holds configuration for getting an item
func (*Put) Execute ¶
func (inp *Put) Execute(db dynamodbiface.DynamoDBAPI) (err error)
Execute will perform the put with a background context
func (*Put) ExecuteWithContext ¶
func (inp *Put) ExecuteWithContext(ctx aws.Context, db dynamodbiface.DynamoDBAPI) (err error)
ExecuteWithContext will put a item into a DynamoDB table
type Query ¶
type Query struct { PagingInput ExpressionHolder dynamodb.QueryInput }
Query holds configuration for a query
func (*Query) Execute ¶
func (inp *Query) Execute(db dynamodbiface.DynamoDBAPI, items interface{}) (count int64, err error)
Execute will perform the query with a background context
func (*Query) ExecuteWithContext ¶
func (inp *Query) ExecuteWithContext(ctx aws.Context, db dynamodbiface.DynamoDBAPI, items interface{}) (count int64, err error)
ExecuteWithContext will perform the query
type Scan ¶
type Scan struct { PagingInput ExpressionHolder dynamodb.ScanInput }
Scan holds configuration for a query
func (*Scan) Execute ¶
func (inp *Scan) Execute(db dynamodbiface.DynamoDBAPI, items interface{}) (count int64, err error)
Execute will scan all items (across partitions) with a background context
func (*Scan) ExecuteWithContext ¶
func (inp *Scan) ExecuteWithContext(ctx aws.Context, db dynamodbiface.DynamoDBAPI, items interface{}) (count int64, err error)
ExecuteWithContext reads all items (across partitions) in a table or index
type Update ¶
type Update struct { ConditionInput ExpressionHolder dynamodb.UpdateItemInput PrimaryKey interface{} }
Update holds configuration for a delete
func (*Update) Execute ¶
func (inp *Update) Execute(db dynamodbiface.DynamoDBAPI) (err error)
Execute will update an item with the background context
func (*Update) ExecuteWithContext ¶
func (inp *Update) ExecuteWithContext(ctx aws.Context, db dynamodbiface.DynamoDBAPI) (err error)
ExecuteWithContext updates an item in a DynamoDB table by its primary key pk with exp