create_table

package
v0.0.0-...-9d7f9ab Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2014 License: BSD-2-Clause Imports: 6 Imported by: 0

Documentation

Overview

Support for the DynamoDB CreateTable endpoint.

example use:

see tests/create_table-livestest.go

Index

Constants

View Source
const (
	ENDPOINT_NAME        = "CreateTable"
	CREATETABLE_ENDPOINT = aws_const.ENDPOINT_PREFIX + ENDPOINT_NAME
)

Variables

This section is empty.

Functions

func ValidTableName

func ValidTableName(t string) bool

ValidTable is a local validator that helps callers determine if a table name is too long.

Types

type Create

type Create struct {
	TableName              string
	AttributeDefinitions   ep.AttributeDefinitions
	KeySchema              ep.KeySchema
	LocalSecondaryIndexes  ep.LocalSecondaryIndexes
	GlobalSecondaryIndexes ep.GlobalSecondaryIndexes
	ProvisionedThroughput  ep.ProvisionedThroughput
}

func NewCreate

func NewCreate() *Create

NewCreate returns a pointer to an instantiation of the Create struct.

func (Create) EndpointReq

func (c Create) EndpointReq() (string, int, error)

EndpointReq implements the Endpoint interface.

func (Create) MarshalJSON

func (c Create) MarshalJSON() ([]byte, error)

type Request

type Request Create

func (Request) EndpointReq

func (req Request) EndpointReq() (string, int, error)

EndpointReq implements the Endpoint interface on the local Request type.

func (Request) MarshalJSON

func (r Request) MarshalJSON() ([]byte, error)

type Response

type Response struct {
	TableDescription struct {
		AttributeDefinitions   ep.AttributeDefinitions
		CreationDateTime       float64
		ItemCount              uint64
		KeySchema              ep.KeySchema
		LocalSecondaryIndexes  []ep.LocalSecondaryIndexDesc
		GlobalSecondaryIndexes []ep.GlobalSecondaryIndexDesc
		ProvisionedThroughput  ep.ProvisionedThroughputDesc
		TableName              string
		TableSizeBytes         uint64
		TableStatus            string
	}
}

func NewResponse

func NewResponse() *Response

NewResponse returns a pointer to an instantiation of the local Response struct.

Jump to

Keyboard shortcuts

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