Documentation ¶
Index ¶
- type AttributeDefinition
- type AttributeType
- type CreateRequest
- type CreateResult
- type DeleteRequest
- type DeleteResult
- type DescribeRequest
- type DescribeResponse
- type KeySchema
- type KeyType
- type ListRequest
- type ListResponse
- type Projection
- type ProjectionType
- type ProvisionedThroughput
- type ProvisionedThroughputDescription
- type SecondaryIndex
- type SecondaryIndexResponse
- type StreamSpecification
- type TableDescription
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttributeDefinition ¶
type AttributeDefinition struct { AttributeName string AttributeType AttributeType }
type AttributeType ¶
type AttributeType string
const ( String AttributeType = "S" Number AttributeType = "N" Binary AttributeType = "B" )
type CreateRequest ¶
type CreateRequest struct { TableName string AttributeDefinitions []AttributeDefinition KeySchema []KeySchema ProvisionedThroughput ProvisionedThroughput GlobalSecondaryIndexes []SecondaryIndex LocalSecondaryIndexes []SecondaryIndex StreamSpecification *StreamSpecification `json:",omitempty"` }
CreateRequest is the request to create a new DynamoDB table.
func NewCreateRequest ¶
func NewCreateRequest(table string) *CreateRequest
func (*CreateRequest) HashKey ¶
func (r *CreateRequest) HashKey(name string, attributeType AttributeType) *CreateRequest
Simple way to add a hash key and attribute definition in one go.
func (*CreateRequest) RangeKey ¶
func (r *CreateRequest) RangeKey(name string, attributeType AttributeType) *CreateRequest
RangeKey is a simple way to add a hash key and attribute definition in one go.
type CreateResult ¶
type CreateResult struct {
TableDescription TableDescription
}
CreateResult describes the table created
type DeleteRequest ¶
type DeleteRequest struct {
TableName string
}
DeleteRequest asks to delete a DynamoDB table
type DeleteResult ¶
type DeleteResult struct {
TableDescription TableDescription
}
DeleteResult describes the table deleted
type DescribeRequest ¶
type DescribeRequest struct {
TableName string
}
DescribeRequest gives details about a single table.
type DescribeResponse ¶
type DescribeResponse struct {
Table TableDescription
}
type ListRequest ¶
type ListRequest struct { ExclusiveStartTableName string `json:",omitempty"` Limit uint `json:",omitempty"` }
ListRequest asks to list all tables on the current account.
type ListResponse ¶
ListResponse is the response of table list request.
type Projection ¶
type Projection struct { ProjectionType ProjectionType NonKeyAttributes []string `json:",omitempty"` }
func NewProjection ¶ added in v1.4.2
func NewProjection(projectionType ProjectionType, nonkeys ...string) Projection
NewProjection is a future-safe way to create a projection
type ProjectionType ¶
type ProjectionType string
const ( ProjectKeysOnly ProjectionType = "KEYS_ONLY" ProjectInclude ProjectionType = "INCLUDE" ProjectAll ProjectionType = "ALL" )
type ProvisionedThroughput ¶
func NewThroughput ¶ added in v1.4.2
func NewThroughput(read, write uint) ProvisionedThroughput
NewThroughput is a shortcut to create a ProvisionedThroughput without using unkeyed literals.
type ProvisionedThroughputDescription ¶ added in v1.1.0
type ProvisionedThroughputDescription struct { ProvisionedThroughput LastDecreaseDateTime float64 LastIncreaseDateTime float64 NumberOfDecreasesToday int }
type SecondaryIndex ¶
type SecondaryIndex struct { IndexName string KeySchema []KeySchema Projection Projection ProvisionedThroughput ProvisionedThroughput }
type SecondaryIndexResponse ¶
type SecondaryIndexResponse struct { SecondaryIndex Backfilling bool IndexSizeBytes int IndexStatus string ItemCount int }
Secondary indexes as described in table descriptions
type StreamSpecification ¶ added in v1.1.0
type TableDescription ¶
type TableDescription struct { TableName string TableSizeBytes uint64 TableStatus string CreationDateTime float64 // Unix epoch time KeySchema []KeySchema AttributeDefinitions []AttributeDefinition GlobalSecondaryIndexes []SecondaryIndexResponse LocalSecondaryIndexes []SecondaryIndexResponse ProvisionedThroughput ProvisionedThroughputDescription // Streams LatestStreamArn string LatestStreamLabel string StreamSpecification *StreamSpecification }