dynamodb

package module
v0.0.0-...-6c41731 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 19, 2015 License: MIT Imports: 15 Imported by: 5 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

dynamodb

A complete client side implementation of the DynamoDB API Version 2012-08-10 along with methods for mapping between items and go values (structs).

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

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeDefinition

type AttributeDefinition struct {
	AttributeName string
	AttributeType string
}

type AttributeValue

type AttributeValue map[string]string

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 BatchWriteItemOptions struct {
	ReturnConsumedCapacity      string `json:",omitempty"`
	ReturnItemCollectionMetrics string `json:",omitempty"`
}

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 ConsumedCapacity struct {
	CapacityUnits float64
	TableName     string
}

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 GetItemOptions struct {
	AttributesToGet        *[]string `json:",omitempty"`
	ConsistentRead         *bool     `json:",omitempty"`
	ReturnConsumedCapacity string    `json:",omitempty"`
}

type GetItemResult

type GetItemResult struct {
	ConsumedCapacity *ConsumedCapacity
	Item             *Item
}

type Item

type Item map[string]AttributeValue

+

type ItemCollectionMetrics

type ItemCollectionMetrics struct {
	ItemCollectionKey   Key
	SizeEstimateRangeGB *[]float64
}

type Key

type Key map[string]AttributeValue

+

type KeyConditions

type KeyConditions map[string]Condition

+

type KeySchemaElement

type KeySchemaElement struct {
	AttributeName string
	KeyType       string
}

type KeysAndAttributes

type KeysAndAttributes struct {
}

type ListTablesOptions

type ListTablesOptions struct {
	ExclusiveStartTableName string `json:",omitempty"`
	Limit                   int    `json:",omitempty"`
}

type ListTablesResult

type ListTablesResult struct {
	LastEvaluatedTableName string
	TableNames             []string
}

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 Mapping

type Mapping interface {
	Register(tableName string, i interface{}) (*TableDescription, error)
	ToItem(s interface{}) Item
	ToKey(s interface{}) Key
	FromItem(tableName string, item Item) interface{}
}

type Projection

type Projection struct {
	NonKeyAttributes []string `json:",omitempty"`
	ProjectionType   string   `json:",omitempty"`
}

type ProvisionedThroughput

type ProvisionedThroughput struct {
	ReadCapacityUnits  int
	WriteCapacityUnits int
}

type ProvisionedThroughputDescription

type ProvisionedThroughputDescription struct {
	LastDecreaseDateTime   DateTime
	LastIncreaseDateTime   DateTime
	NumberOfDecreasesToday int
	ReadCapacityUnits      int
	WriteCapacityUnits     int
}

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址