Documentation
¶
Index ¶
- func UnmarshalAll(r Result, v interface{}) (err error)
- type Deitemizer
- type Dynamo
- type Item
- type Itemizer
- type Querier
- type Reader
- type Result
- type Scanner
- type Writer
- func Check(eb expression.Builder, o dynamodb.ConditionCheck, key Itemizer) *Writer
- func Delete(eb expression.Builder, o dynamodb.Delete, key Itemizer) *Writer
- func NewWriter() *Writer
- func Put(eb expression.Builder, o dynamodb.Put, item Itemizer) *Writer
- func Update(eb expression.Builder, o dynamodb.Update, key Itemizer) *Writer
- func (tx *Writer) Check(eb expression.Builder, chk dynamodb.ConditionCheck, key Itemizer) *Writer
- func (tx *Writer) Delete(eb expression.Builder, del dynamodb.Delete, key Itemizer) *Writer
- func (tx *Writer) Put(eb expression.Builder, put dynamodb.Put, item Itemizer) *Writer
- func (tx *Writer) Run(ctx context.Context, ddb Dynamo) (r Result, err error)
- func (tx *Writer) Update(eb expression.Builder, upd dynamodb.Update, key Itemizer) *Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnmarshalAll ¶ added in v0.6.0
UnmarshalAll will run through all results in 'r' and unmarshal all items into 'v'. It will consume the result in the process and it cannot scanned again afterwards. Each element of v must implement the Itemizer and Deitemizer interface.
Types ¶
type Deitemizer ¶
type Deitemizer interface {
FromItem(Item)
}
type Dynamo ¶
type Dynamo interface { PutItemWithContext( aws.Context, *dynamodb.PutItemInput, ...request.Option, ) (*dynamodb.PutItemOutput, error) GetItemWithContext( aws.Context, *dynamodb.GetItemInput, ...request.Option, ) (*dynamodb.GetItemOutput, error) DeleteItemWithContext( aws.Context, *dynamodb.DeleteItemInput, ...request.Option, ) (*dynamodb.DeleteItemOutput, error) UpdateItemWithContext( aws.Context, *dynamodb.UpdateItemInput, ...request.Option, ) (*dynamodb.UpdateItemOutput, error) QueryWithContext( aws.Context, *dynamodb.QueryInput, ...request.Option, ) (*dynamodb.QueryOutput, error) TransactWriteItemsWithContext( aws.Context, *dynamodb.TransactWriteItemsInput, ...request.Option, ) (*dynamodb.TransactWriteItemsOutput, error) TransactGetItemsWithContext( aws.Context, *dynamodb.TransactGetItemsInput, ...request.Option, ) (*dynamodb.TransactGetItemsOutput, error) ScanWithContext( aws.Context, *dynamodb.ScanInput, ...request.Option, ) (*dynamodb.ScanOutput, error) }
Dynamo describes the strict sub-set official DynamoDB interface that this library uses.
type Querier ¶
type Querier struct {
// contains filtered or unexported fields
}
Querier holds a DynamoDB query
func Query ¶
func Query(b expression.Builder, in dynamodb.QueryInput) (q *Querier)
Query sets up a query that can be run to fetch
type Reader ¶ added in v0.6.0
type Reader struct {
// contains filtered or unexported fields
}
Reader represents one or more read to dynamodb
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner holds a DynamoDB query
type Writer ¶ added in v0.6.0
type Writer struct {
// contains filtered or unexported fields
}
Writer represents one or more DynamoDB write operations
func Check ¶
func Check(eb expression.Builder, o dynamodb.ConditionCheck, key Itemizer) *Writer
Check will setup a write with the check
func (*Writer) Check ¶ added in v0.6.0
func (tx *Writer) Check(eb expression.Builder, chk dynamodb.ConditionCheck, key Itemizer) *Writer
Check will add a check operation to the write
Click to show internal directories.
Click to hide internal directories.