Documentation
¶
Overview ¶
A complete client side implementation of the DynamoDB API Version 2012-08-10 along with methods for mapping between items and go values (structs).
Index ¶
- type AttributeDefinition
- type AttributeValue
- type AttributeValueUpdate
- type BatchGetItemOptions
- type BatchGetItemResult
- type BatchWriteItemOptions
- type BatchWriteItemResult
- type Condition
- type ConsumedCapacity
- type CreateTableOptions
- type CreateTableResult
- type DateTime
- type DeleteItemOptions
- type DeleteItemResult
- type DeleteRequest
- type DeleteTableOptions
- type DeleteTableResult
- type DescribeTableOptions
- type DescribeTableResult
- type DynamoDB
- type ExpectedAttributeValue
- type GetItemOptions
- type GetItemResult
- type Item
- type ItemCollectionMetrics
- type Key
- type KeyConditions
- type KeySchemaElement
- type KeysAndAttributes
- type ListTablesOptions
- type ListTablesResult
- type LocalSecondaryIndex
- type LocalSecondaryIndexDescription
- type Mapping
- type Projection
- type ProvisionedThroughput
- type ProvisionedThroughputDescription
- type PutItemOptions
- type PutItemResult
- type PutRequest
- type QueryOptions
- type QueryResult
- type ScanOptions
- type ScanResult
- type TableDescription
- type UpdateItemOptions
- type UpdateItemResult
- type UpdateTableOptions
- type UpdateTableResult
- type WriteRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeDefinition ¶
type AttributeValue ¶
type AttributeValueUpdate ¶
type AttributeValueUpdate struct {
Action string `json:",omitempty"`
Value AttributeValue `json:",omitempty"`
}
type BatchGetItemOptions ¶
type BatchGetItemOptions struct {
ReturnConsumedCapacity string `json:",omitempty"`
}
type BatchGetItemResult ¶
type BatchGetItemResult struct {
ConsumedCapacity *ConsumedCapacity
Responses map[string][]Item
UnprocessedKeys map[string]KeysAndAttributes
}
type BatchWriteItemOptions ¶
type BatchWriteItemResult ¶
type BatchWriteItemResult struct {
ConsumedCapacity *ConsumedCapacity
ItemCollectionMetrics *ItemCollectionMetrics
UnprocessedKeys map[string]WriteRequest
}
type Condition ¶
type Condition struct {
AttributeValueList []AttributeValue
ComparisonOperator string
}
type ConsumedCapacity ¶
type CreateTableOptions ¶
type CreateTableOptions struct {
LocalSecondaryIndexes []LocalSecondaryIndex `json:",omitempty"`
}
type CreateTableResult ¶
type CreateTableResult struct {
TableDescription *TableDescription
}
type DateTime ¶
type DateTime float64
Represents the date and time when the table was created, in UNIX epoch time format.
type DeleteItemOptions ¶
type DeleteItemOptions struct {
Expected map[string]ExpectedAttributeValue `json:",omitempty"`
ReturnConsumedCapacity string `json:",omitempty"`
ReturnItemCollectionMetrics string `json:",omitempty"`
ReturnValues string `json:",omitempty"`
}
type DeleteItemResult ¶
type DeleteItemResult struct {
Attributes map[string]AttributeValue
ConsumedCapacity *ConsumedCapacity
ItemCollectionMetrics *ItemCollectionMetrics
}
type DeleteRequest ¶
type DeleteRequest struct {
Key Key
}
type DeleteTableOptions ¶
type DeleteTableOptions struct {
}
There are no options for the DeleteTable action in the API Version 2012-08-10.
type DeleteTableResult ¶
type DeleteTableResult struct {
TableDescription *TableDescription
}
type DescribeTableOptions ¶
type DescribeTableOptions struct {
}
There are no options for the DescribeTable action in the API Version 2012-08-10.
type DescribeTableResult ¶
type DescribeTableResult struct {
Table *TableDescription
}
type DynamoDB ¶
type DynamoDB interface {
Mapping
BatchGetItem(requestedItems map[string]KeysAndAttributes, options *BatchGetItemOptions) (*BatchGetItemResult, error)
BatchWriteItem(requestedItems map[string]WriteRequest, options *BatchWriteItemOptions) (*BatchWriteItemResult, error)
CreateTable(tableName string, attributeDefinitions []AttributeDefinition, keySchema []KeySchemaElement, ProvisionedThroughput ProvisionedThroughput, options *CreateTableOptions) (*CreateTableResult, error)
DeleteItem(tableName string, key Key, options *DeleteItemOptions) (*DeleteItemResult, error)
DeleteTable(tableName string, options *DeleteTableOptions) (*DeleteTableResult, error)
DescribeTable(tableName string, options *DescribeTableOptions) (*DescribeTableResult, error)
GetItem(tableName string, key Key, options *GetItemOptions) (*GetItemResult, error)
ListTables(options *ListTablesOptions) (*ListTablesResult, error)
PutItem(tableName string, item Item, options *PutItemOptions) (*PutItemResult, error)
Query(tableName string, options *QueryOptions) (*QueryResult, error)
Scan(tableName string, options *ScanOptions) (*ScanResult, error)
UpdateItem(tableName string, key Key, options *UpdateItemOptions) (*UpdateItemResult, error)
UpdateTable(tableName string, provisionedThroughput ProvisionedThroughput, options *UpdateTableOptions) (*UpdateTableResult, error)
}
func NewDynamoDB ¶
func NewDynamoDB() DynamoDB
func NewMemoryDB ¶
func NewMemoryDB() DynamoDB
type ExpectedAttributeValue ¶
type ExpectedAttributeValue struct {
Exists *bool `json:",omitempty"`
Value AttributeValue `json:",omitempty"`
}
type GetItemOptions ¶
type GetItemResult ¶
type GetItemResult struct {
ConsumedCapacity *ConsumedCapacity
Item *Item
}
type ItemCollectionMetrics ¶
type KeySchemaElement ¶
type KeysAndAttributes ¶
type KeysAndAttributes struct {
}
type ListTablesOptions ¶
type ListTablesResult ¶
type LocalSecondaryIndex ¶
type LocalSecondaryIndex struct {
IndexName string
KeySchema []KeySchemaElement
Projection Projection
}
type LocalSecondaryIndexDescription ¶
type LocalSecondaryIndexDescription struct {
IndexName string
IndexSizeBytes int64
ItemCount int64
KeySchema []KeySchemaElement
Projection *Projection
}
type Projection ¶
type ProvisionedThroughput ¶
type PutItemOptions ¶
type PutItemOptions struct {
Expected map[string]ExpectedAttributeValue `json:",omitempty"`
ReturnConsumedCapacity string `json:",omitempty"`
ReturnItemCollectionMetrics string `json:",omitempty"`
ReturnValues string `json:",omitempty"`
}
type PutItemResult ¶
type PutItemResult struct {
Attributes map[string]AttributeValue
ConsumedCapacity *ConsumedCapacity
ItemCollectionMetrics *ItemCollectionMetrics
}
type PutRequest ¶
type PutRequest struct {
Item Item
}
type QueryOptions ¶
type QueryOptions struct {
AttributesToGet []string `json:",omitempty"`
ConsistentRead bool `json:",omitempty"`
ExclusiveStartKey Key `json:",omitempty"`
IndexName string `json:",omitempty"`
KeyConditions KeyConditions `json:",omitempty"`
Limit int `json:",omitempty"`
ReturnConsumedCapacity string `json:",omitempty"`
ScanIndexForward *bool `json:",omitempty"` // defaults to true
Select string `json:",omitempty"`
}
type QueryResult ¶
type QueryResult struct {
ConsumedCapacity *ConsumedCapacity
Count int
Items []Item
LastEvaluatedKey Key
}
type ScanOptions ¶
type ScanOptions struct {
AttributesToGet []string `json:",omitempty"`
ExclusiveStartKey Key `json:",omitempty"`
Limit int `json:",omitempty"`
ReturnConsumedCapacity string `json:",omitempty"`
ScanFilter KeyConditions `json:",omitempty"`
Segment int `json:",omitempty"`
Select string `json:",omitempty"`
TotalSegments int `json:",omitempty"`
}
type ScanResult ¶
type ScanResult struct {
ConsumedCapacity *ConsumedCapacity
Count int
Items []Item
LastEvaluatedKey Key
ScannedCount int
}
type TableDescription ¶
type TableDescription struct {
AttributeDefinitions []AttributeDefinition
CreationDateTime DateTime
ItemCount int64
KeySchema []KeySchemaElement
LocalSecondaryIndexes []LocalSecondaryIndexDescription
ProvisionedThroughput *ProvisionedThroughputDescription
TableName string
TableSizeBytes int64
TableStatus string
}
type UpdateItemOptions ¶
type UpdateItemOptions struct {
AttributeUpdates map[string]AttributeValueUpdate `json:",omitempty"`
Expected map[string]ExpectedAttributeValue `json:",omitempty"`
ReturnConsumedCapacity string `json:",omitempty"`
ReturnItemCollectionMetrics string `json:",omitempty"`
ReturnValues string `json:",omitempty"`
}
type UpdateItemResult ¶
type UpdateItemResult struct {
Attributes map[string]AttributeValue
ConsumedCapacity *ConsumedCapacity
ItemCollectionMetrics *ItemCollectionMetrics
}
type UpdateTableOptions ¶
type UpdateTableOptions struct {
}
There are no options for the UpdateTable action in the API Version 2012-08-10.
type UpdateTableResult ¶
type UpdateTableResult struct {
TableDescription *TableDescription
}
type WriteRequest ¶
type WriteRequest struct {
DeleteRequest *DeleteRequest `json:",omitempty"`
PutRequest *PutRequest `json:",omitempty"`
}