dynamo

package
v0.0.0-...-1a19813 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2015 License: BSD-3-Clause Imports: 7 Imported by: 1

Documentation

Overview

Dynamo

This package contains objects needed to do request to DynamoDB.

GetItem

As defined: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_GetItem.html. However the "Key" attribute has been renamed to "Search".

// build the request
getItemRequest := dynamo.NewGetItemRequest()
getItemRequest.AttributesToGet = []{"MyKey", "MyVal", "MyOtherVal"}
getItemRequest.Search["MyKey"] = "Hello"
getItemRequest.ConsistentRead = true
getItemRequest.TableName = "my.table.name"
getItemRequest.ReturnConsumedCapacity = dynamo.ConsumedCapacity_INDEXES
// set the region
getItemRequest.Host.Region = "us-west-2"
// set the keys
getItemRequest.Key, err = awsgo.GetSecurityKeys()
// test err ...
// do the request!
resp, err := getItemRequest.Request()
if err != nil {
    os.Exit(1)
}
if len(resp.Item) == 0 {
    // no items returned
    return
}
myKey := resp.Item["MyKey"].(string)
myVal := resp.Item["MyVal"].(float64)
myOtherVal := resp.Item["MyOtherVal"].([]string)

PutItem

As defined: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html

// build the request
putItem := dynamo.NewPutItemRequest()
putItem.Item["MyKey"] = "Asd"
putItem.Item["SomeNumbers"] = []float64{23.232,4342,112}
putItem.Expected = dynamo.ExpectedItem{false, nil} // we don't expect it to exist
putItem.TableName = "the.best.table"
putItem.ReturnValues = dynamo.ReturnValues_ALL_NEW
// set the region
putItem.Host.Region = "us-west-2"
// set the keys
putItem.Key, err = awsgo.GetSecurityKeys()
// test err ...
// do the request!
resp, err := putItem.Request()
if err != nil {
    os.Exit(1)
}
if len(resp.BeforeAttributes) == 0 {
    // no items returned
    return
}
assert(resp.BeforeAttributes["MyKey"].(string) == "Asd")

DeleteItem

As defined: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_DeleteItem.html

// build the request
deleteItem := dynamo.NewDeleteItemRequest()
deleteItem.DeleteKey["MyKey"] = "Asd"
deleteItem.TableName = "the.best.table"
deleteItem.Expected = dynamo.ExpectedItem{true, "Asd"} // we expect it to exist
deleteItem.ReturnValues = dynamo.ReturnValues_ALL_NEW
// set the region
deleteItem.Host.Region = "us-west-2"
// set the keys
deleteItem.Key, err = awsgo.GetSecurityKeys()
// test err ...
// do the request!
resp, err := deleteItem.Request()
if err != nil {
    os.Exit(1)
}
if len(resp.Attributes) == 0 {
    // no items returned
    return
}
assert(resp.Attributes["MyKey"].(string) == "Asd")

BatchWriteItem

As defined: http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_BatchWriteItem.html

// build the request
batchWrite := dynamo.NewBatchWriteItemRequest()
batchWrite.AddPutRequest("test.table", map[string]interface{}{
    "MyKey" : "Asd",
    "SomeVal": []string{"gfdg", "Dfgd"},
    "SomeMore": 343.34,
})
batchWrite.AddDeleteRequest("worst.table", map[string]interface{}{
    "ItsKey" : 434334,
})
// set the region
deleteItem.Host.Region = "us-west-2"
// set the keys
deleteItem.Key, err = awsgo.GetSecurityKeys()
// test err ...
// do the request!
resp, err := deleteItem.Request()
if err != nil {
    os.Exit(1)
}
if len(resp.UnprocessedItems) > 0 {
    // Need to make another request, since not all items were processed
    // For the next batchWrite2 set RequestItems = UnprocessedItems
}

Index

Constants

View Source
const (
	ConsumedCapacity_TOTAL   = "TOTAL"
	ConsumedCapacity_NONE    = "NONE"
	ConsumedCapacity_INDEXES = "INDEXES"

	ReturnItemCollection_SIZE = "SIZE"
	ReturnItemCollection_NONE = "NONE"

	// apply to update & put
	ReturnValues_NONE        = "NONE"
	ReturnValues_ALL_OLD     = "ALL_OLD"
	ReturnValues_UPDATED_OLD = "UPDATED_OLD"
	ReturnValues_ALL_NEW     = "ALL_NEW"
	ReturnValues_UPDATED_NEW = "UPDATED_NEW"

	ItemCollectionMetrics_SIZE = "SIZE"
	ItemCollectionMetrics_NONE = "NONE"

	ComparisonOperator_EQ          = "EQ"
	ComparisonOperator_LE          = "LE"
	ComparisonOperator_LT          = "LT"
	ComparisonOperator_GE          = "GE"
	ComparisonOperator_GT          = "GT"
	ComparisonOperator_BEGINS_WITH = "BEGINS_WITH"
	ComparisonOperator_BETWEEN     = "BETWEEN"

	Select_ALL_ATTRIBUTES           = "ALL_ATTRIBUTES"
	Select_ALL_PROJECTED_ATTRIBUTES = "ALL_PROJECTED_ATTRIBUTES"
	Select_COUNT                    = "COUNT"
	Select_SPECIFIC_ATTRIBUTES      = "SPECIFIC_ATTRIBUTES"
)

Variable Constants

View Source
const (
	GetItemTarget        = "DynamoDB_20120810.GetItem"
	PutItemTarget        = "DynamoDB_20120810.PutItem"
	BatchGetItemTarget   = "DynamoDB_20120810.BatchGetItem"
	UpdateItemTarget     = "DynamoDB_20120810.UpdateItem"
	BatchWriteItemTarget = "DynamoDB_20120810.BatchWriteItem"
	QueryTarget          = "DynamoDB_20120810.Query"
	DeleteItemTarget     = "DynamoDB_20120810.DeleteItem"
	ScanTarget           = "DynamoDB_20120810.Scan"
	DescribeTableTarget  = "DynamoDB_20120810.DescribeTable"
	UpdateTableTarget    = "DynamoDB_20120810.UpdateTable"
)

Targets

View Source
const (
	ConditionalCheckFailed = "com.amazonaws.dynamodb.v20120810#ConditionalCheckFailedException"
	SerializationException = "com.amazon.coral.service#SerializationException"
	ValidationException    = "com.amazon.coral.validate#ValidationException"
	UnknownServerError     = "UnknownServerError"
	AccessDeniedException  = "com.amazon.coral.service#AccessDeniedException"
	ThroughputException    = "com.amazonaws.dynamodb.v20120810#ProvisionedThroughputExceededException"
)

Known Errors

View Source
const (
	AttributeUpdate_Action_Add    = "ADD"
	AttributeUpdate_Action_Put    = "PUT"
	AttributeUpdate_Action_Delete = "DELETE"
)

Variables

View Source
var (
	Verification_Error_TableNameEmpty = errors.New("TableName cannot be empty")
	Verification_Error_SearchEmpty    = errors.New("Search parameters cannot be empty")
	Verification_Error_RegionEmpty    = errors.New("Host.Region cannot be empty")
	Verification_Error_ServiceEmpty   = errors.New("Host.Service cannot be empty")
)
View Source
var (
	BACKOFF_EXCEEDED = errors.New("Backoff exceeded. Giving up.")
)
View Source
var (
	Verification_Error_DeleteKeyEmpty = errors.New("DeleteKey cannot be empty")
)

Functions

func AsBoolOr

func AsBoolOr(item map[string]interface{}, key string, elze bool) bool

parses the value to be a boolean. using strconv. if it is a float then it returns true on the value != 0 if the value doesn't exit, returns elze

func AsFloatOr

func AsFloatOr(item map[string]interface{}, key string, elze float64) float64

returns the value in the map if it exists, otherise 'elze' value is returned

func AsStringOr

func AsStringOr(item map[string]interface{}, key, elze string) string

returns the value in the map if it exists, otherise 'elze' value is returned

func CheckForErrorResponse

func CheckForErrorResponse(response []byte, statusCode int) error

func Marshal

func Marshal(v interface{}) map[string]interface{}

takes an struct and returns a map that can be used write or put item with

you can rename a field via: `dynamo:"rename"` tag
fields can be omitted via: `dynamo:"-"` tag
empty strings are not marshalled, same for empty arrays
non basic types (eg interfaces, structs, pointers) are marshalled as json string

func Unmarshal

func Unmarshal(in map[string]map[string]interface{}, out interface{}) error

Unmarshalls a JSON response from AWS.

Types

type AttributeUpdates

type AttributeUpdates struct {
	Action string
	Value  interface{}
}

type BatchGetItemRequest

type BatchGetItemRequest struct {
	awsgo.RequestBuilder

	RequestItems           map[string]BatchGetItemRequestTable
	ReturnConsumedCapacity string
}

func NewBatchGetItemRequest

func NewBatchGetItemRequest() *BatchGetItemRequest

func (BatchGetItemRequest) DeMarshalResponse

func (gir BatchGetItemRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (BatchGetItemRequest) Request

func (*BatchGetItemRequest) VerifyInput

func (gir *BatchGetItemRequest) VerifyInput() error

type BatchGetItemRequestTable

type BatchGetItemRequestTable struct {
	AttributesToGet []string `json:",omitempty"`
	ConsistentRead  bool
	Search          []map[string]interface{} `json:"Keys"`
}

func NewBatchGetIteamRequestTable

func NewBatchGetIteamRequestTable() (ret BatchGetItemRequestTable)

type BatchGetItemResponse

type BatchGetItemResponse struct {
	ConsumedCapacity   *CapacityResult                                 `json:",omitempty"`
	Responses          map[string][]map[string]interface{}             `json:"-"`
	RawResponses       map[string][]map[string]map[string]interface{}  `json:"Responses"`
	UnprocessedKeys    map[string]BatchGetItemRequestTable             `json:"-"`
	RawUnprocessedKeys map[string]batchGetItemRequestTableDeserialized `json:"UnprocessedKeys"`
}

func (*BatchGetItemResponse) Next

type BatchWriteItem

type BatchWriteItem struct {
	DeleteRequest *BatchWriteItemDeleteRequest `json:",omitempty"`
	PutRequest    *BatchWriteItemPutRequest    `json:",omitempty"`
}

type BatchWriteItemDeleteRequest

type BatchWriteItemDeleteRequest struct {
	Key map[string]interface{}
}

type BatchWriteItemPutRequest

type BatchWriteItemPutRequest struct {
	Item map[string]interface{}
}

type BatchWriteItemRequest

type BatchWriteItemRequest struct {
	awsgo.RequestBuilder

	RequestItems                map[string][]BatchWriteItem
	ReturnConsumedCapacity      string
	ReturnItemCollectionMetrics string
}

func NewBatchWriteItemRequest

func NewBatchWriteItemRequest() *BatchWriteItemRequest

func (*BatchWriteItemRequest) AddDeleteRequest

func (req *BatchWriteItemRequest) AddDeleteRequest(table string, items map[string]interface{})

* Adds the delete request items into the request.

  • @param table the name of the table to modify
  • @param items a map of awsgo.AwsStringItem and awsgo.AwsNumberItem

func (*BatchWriteItemRequest) AddPutRequest

func (req *BatchWriteItemRequest) AddPutRequest(table string, items map[string]interface{})

* Adds the put request items into the request.

  • @param table the name of the table to modify
  • @param items a map of awsgo.AwsStringItem and awsgo.AwsNumberItem

func (*BatchWriteItemRequest) AddTable

func (req *BatchWriteItemRequest) AddTable(name string)

func (BatchWriteItemRequest) DeMarshalResponse

func (gir BatchWriteItemRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (BatchWriteItemRequest) Request

func (BatchWriteItemRequest) RequestIncludingUnprocessed

func (gir BatchWriteItemRequest) RequestIncludingUnprocessed(sleep time.Duration) (*BatchWriteItemResponse, error)

makes the request, and tries to include the unprocessed request items in subsequent requests

func (BatchWriteItemRequest) RequestSplit

func (gir BatchWriteItemRequest) RequestSplit(sleep time.Duration) ([]*BatchWriteItemResponse, error)

Makes multiple requests, if too many actions were added. Also automatically retries unprocessed items. returns on the first error. @param sleep - the amount of time to sleep between requests. 0 implies no added sleeping

func (*BatchWriteItemRequest) VerifyInput

func (gir *BatchWriteItemRequest) VerifyInput() error

type BatchWriteItemResponse

type BatchWriteItemResponse struct {
	ConsumedCapacity      *CapacityResult              `json:",omitempty"`
	ItemCollectionMetrics *ItemCollectionMetricsStruct `json:",omitempty"`
	UnprocessedItems      map[string][]BatchWriteItem  `json:"-"`
	//     table  | operations| key/item | name     | item type/value
	RawUnprocessItems map[string][]map[string]map[string]map[string]map[string]interface{} `json:"UnprocessedItems"`
}

type CapacityResult

type CapacityResult struct {
	CapacityUnits          float64
	TableName              string
	Table                  *CapacityUnitsStruct
	GlobalSecondaryIndexes map[string]CapacityUnitsStruct
	LocalSecondaryIndexes  map[string]CapacityUnitsStruct
}

type CapacityUnitsStruct

type CapacityUnitsStruct struct {
	CapacityUnits float64
}

type DeleteItemRequest

type DeleteItemRequest struct {
	awsgo.RequestBuilder

	// keys that we expect to exist, or not exist
	Expected map[string]ExpectedItem `json:",omitempty"`
	// the key of the entry we are deleting
	DeleteKey                   map[string]interface{} `json:"Key,omitempty"`
	ReturnConsumedCapacity      string
	ReturnItemCollectionMetrics string
	ReturnValues                string
	TableName                   string
}

func NewDeleteItemRequest

func NewDeleteItemRequest() *DeleteItemRequest

Creates a new DeleteItemRequest

func (DeleteItemRequest) DeMarshalResponse

func (gir DeleteItemRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (DeleteItemRequest) Request

func (gir DeleteItemRequest) Request() (*DeleteItemResponse, error)

func (*DeleteItemRequest) VerifyInput

func (gir *DeleteItemRequest) VerifyInput() error

type DeleteItemResponse

type DeleteItemResponse struct {
	ConsumedCapacity      *CapacityResult                   `json:"ConsumedCapacity,omitempty"`
	Attributes            map[string]interface{}            `json:"-"`
	RawAttributes         map[string]map[string]interface{} `json:"Attributes"`
	ItemCollectionMetrics *ItemCollectionMetricsStruct      `json:",omitempty"`
}

type DescribeTableRequest

type DescribeTableRequest struct {
	awsgo.RequestBuilder

	TableName string
}

func NewDescribeTableRequest

func NewDescribeTableRequest() *DescribeTableRequest

Creates a new DescribeTableRequest, populating in some defaults

func (DescribeTableRequest) DeMarshalResponse

func (req DescribeTableRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (DescribeTableRequest) Request

func (*DescribeTableRequest) VerifyInput

func (req *DescribeTableRequest) VerifyInput() error

type DescribeTableResponse

type DescribeTableResponse struct {
	Table desrcibleTableTable
}

type ErrorResult

type ErrorResult struct {
	Type       string `json:"__type"`
	Message    string `json:"message"`
	StatusCode int
}

func (*ErrorResult) Error

func (e *ErrorResult) Error() string

type ExpectedItem

type ExpectedItem struct {
	Exists bool        `json:",string"`
	Value  interface{} `json:",omitempty"`
}

type GetItemRequest

type GetItemRequest struct {
	awsgo.RequestBuilder

	AttributesToGet []string `json:",omitempty"`
	ConsistentRead  bool
	// The key to search for
	Search                 map[string]interface{} `json:"Key"`
	TableName              string
	ReturnConsumedCapacity string
}

func NewGetItemRequest

func NewGetItemRequest() *GetItemRequest

Creates a new GetItemRequest, populating in some defaults

func (GetItemRequest) CoDoAndDemarshall

func (gir GetItemRequest) CoDoAndDemarshall(request awsgo.AwsRequest, future *GetItemResponseFuture)

func (GetItemRequest) CoRequest

func (gir GetItemRequest) CoRequest() (*GetItemResponseFuture, error)

func (GetItemRequest) DeMarshalResponse

func (gir GetItemRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (GetItemRequest) Request

func (gir GetItemRequest) Request() (*GetItemResponse, error)

func (*GetItemRequest) VerifyInput

func (gir *GetItemRequest) VerifyInput() error

type GetItemResponse

type GetItemResponse struct {
	// if return consumed capacity was set, this will populate with the result
	ConsumedCapacity *CapacityResult `json:"ConsumedCapacity,omitempty"`
	// the item response, with easily castable values
	Item map[string]interface{} `json:"-"`
	// the raw item response from the wire
	RawItem map[string]map[string]interface{} `json:"Item"`
}

type GetItemResponseFuture

type GetItemResponseFuture struct {
	// contains filtered or unexported fields
}

func (*GetItemResponseFuture) Get

type ItemCollectionMetricsStruct

type ItemCollectionMetricsStruct struct {
	RawItemCollectionKey map[string]map[string]interface{} `json:"ItemCollectionKey"`
	ItemCollectionKey    map[string]interface{}            `json:"-"`
	SizeEstimateRangeGB  []string
}

type KeyConditions

type KeyConditions struct {
	AttributeValueList []interface{}
	ComparisonOperator string
}

type PutItemRequest

type PutItemRequest struct {
	awsgo.RequestBuilder

	Expected                    map[string]ExpectedItem `json:",omitempty"`
	Item                        map[string]interface{}  `json:"Item"`
	TableName                   string
	ReturnConsumedCapacity      string
	ReturnItemCollectionMetrics string
	ReturnValues                string
}

http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_PutItem.html

func NewPutItemRequest

func NewPutItemRequest() *PutItemRequest

func (PutItemRequest) CoDoAndDemarshall

func (pir PutItemRequest) CoDoAndDemarshall(request awsgo.AwsRequest, future *PutItemResponseFuture)

func (PutItemRequest) CoRequest

func (pir PutItemRequest) CoRequest() (*PutItemResponseFuture, error)

func (PutItemRequest) DeMarshalResponse

func (pir PutItemRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (PutItemRequest) Request

func (pir PutItemRequest) Request() (*PutItemResponse, error)

func (*PutItemRequest) VerifyInput

func (pir *PutItemRequest) VerifyInput() error

type PutItemResponse

type PutItemResponse struct {
	RawBeforeAttributes   map[string]map[string]interface{} `json:"Attributes"`
	BeforeAttributes      map[string]interface{}            `json:"-"`
	ConsumedCapacity      *CapacityResult                   `json:",omitempty"`
	ItemCollectionMetrics *ItemCollectionMetricsStruct      `json:",omitempty"`
}

type PutItemResponseFuture

type PutItemResponseFuture struct {
	// contains filtered or unexported fields
}

func (*PutItemResponseFuture) Get

type QueryRequest

type QueryRequest struct {
	awsgo.RequestBuilder

	AttributesToGet        []string `json:",omitempty"`
	ConsistentRead         bool
	ExclusiveStartKey      map[string]interface{}   `json:",omitempty"`
	IndexName              string                   `json:",omitempty"`
	KeyConditions          map[string]KeyConditions `json:",omitempty"`
	Limit                  float64                  `json:",omitempty"`
	ReturnConsumedCapacity string                   `json:",omitempty"`
	ScanIndexForward       *bool                    `json:",omitempty"`
	Select                 string                   `json:",omitempty"`
	TableName              string
}

func NewQueryRequest

func NewQueryRequest() *QueryRequest

func (*QueryRequest) AddKeyCondition

func (req *QueryRequest) AddKeyCondition(keyName string, values []interface{}, operator string)

func (QueryRequest) DeMarshalResponse

func (gir QueryRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (QueryRequest) Request

func (gir QueryRequest) Request() (*QueryResponse, error)

func (*QueryRequest) VerifyInput

func (gir *QueryRequest) VerifyInput() error

type QueryResponse

type QueryResponse struct {
	ConsumedCapacity    *CapacityResult `json:",omitempty"`
	Count               float64
	Items               []map[string]interface{}            `json:"-"`
	RawItems            []map[string]map[string]interface{} `json:"Items"`
	LastEvaluatedKey    map[string]interface{}              `json:"-"`
	RawLastEvaluatedKey map[string]map[string]interface{}   `json:"LastEvaluatedKey"`
}

func (*QueryResponse) Next

func (q *QueryResponse) Next(lastRequest *QueryRequest) (*QueryResponse, error)

evalutes the query again, setting the LastEvaluatedKey

type ScanRequest

type ScanRequest struct {
	awsgo.RequestBuilder

	AttributesToGet        []string                 `json:",omitempty"`
	ExclusiveStartKey      map[string]interface{}   `json:",omitempty"`
	Limit                  float64                  `json:",omitempty"`
	ReturnConsumedCapacity string                   `json:",omitempty"`
	ScanFilter             map[string]KeyConditions `json:",omitempty"`
	Segment                *int                     `json:",omitempty"`
	Select                 string                   `json:",omitempty"`
	TableName              string
	TotalSegments          *int `json:",omitempty"`
}

func NewScanRequest

func NewScanRequest() *ScanRequest

func (ScanRequest) DeMarshalResponse

func (gir ScanRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (ScanRequest) Request

func (gir ScanRequest) Request() (*ScanResponse, error)

func (*ScanRequest) SetScanFilter

func (req *ScanRequest) SetScanFilter(keyName string, values []interface{}, operator string)

func (*ScanRequest) VerifyInput

func (gir *ScanRequest) VerifyInput() error

type ScanResponse

type ScanResponse struct {
	ConsumedCapacity    *CapacityResult `json:",omitempty"`
	Count               float64
	Items               []map[string]interface{}            `json:"-"`
	RawItems            []map[string]map[string]interface{} `json:"Items"`
	LastEvaluatedKey    map[string]interface{}              `json:"-"`
	RawLastEvaluatedKey map[string]map[string]interface{}   `json:"LastEvaluatedKey"`
	ScannedCount        float64
}

func (*ScanResponse) Next

func (q *ScanResponse) Next(lastRequest *ScanRequest) (*ScanResponse, error)

evalutes the query again, setting the LastEvaluatedKey

type SetProvisionedThroughput

type SetProvisionedThroughput struct {
	ReadCapacityUnits  float64
	WriteCapacityUnits float64
}

type UpdateItemRequest

type UpdateItemRequest struct {
	awsgo.RequestBuilder

	Expected               map[string]ExpectedItem     `json:",omitempty"`
	UpdateKey              map[string]interface{}      `json:"Key"`
	Update                 map[string]AttributeUpdates `json:"AttributeUpdates"`
	TableName              string
	ReturnConsumedCapacity string
	ReturnItemCollection   string
	ReturnValues           string
}

http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_UpdateItem.html

func NewUpdateItemRequest

func NewUpdateItemRequest() *UpdateItemRequest

func (UpdateItemRequest) CoDoAndDemarshall

func (pir UpdateItemRequest) CoDoAndDemarshall(request awsgo.AwsRequest, future *UpdateItemResponseFuture)

func (UpdateItemRequest) CoRequest

func (pir UpdateItemRequest) CoRequest() (*UpdateItemResponseFuture, error)

func (UpdateItemRequest) DeMarshalResponse

func (pir UpdateItemRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (UpdateItemRequest) Request

func (pir UpdateItemRequest) Request() (*UpdateItemResponse, error)

func (*UpdateItemRequest) VerifyInput

func (pir *UpdateItemRequest) VerifyInput() error

type UpdateItemResponse

type UpdateItemResponse struct {
	RawBeforeAttributes   map[string]map[string]interface{} `json:"Attributes"`
	BeforeAttributes      map[string]interface{}            `json:"-"`
	ConsumedCapacity      *CapacityResult                   `json:",omitempty"`
	ItemCollectionMetrics *ItemCollectionMetricsStruct      `json:",omitempty"`
}

type UpdateItemResponseFuture

type UpdateItemResponseFuture struct {
	// contains filtered or unexported fields
}

func (*UpdateItemResponseFuture) Get

type UpdateTableRequest

type UpdateTableRequest struct {
	awsgo.RequestBuilder

	GlobalSecondaryIndexUpdates []setGlobalSecondaryIndex `json:",omitempty"`
	ProvisionedThroughput       *SetProvisionedThroughput `json:",omitempty"`
	TableName                   string
}

func NewUpdateTableRequest

func NewUpdateTableRequest() *UpdateTableRequest

Creates a new UpdateTableRequest, populating in some defaults

func (UpdateTableRequest) DeMarshalResponse

func (req UpdateTableRequest) DeMarshalResponse(response []byte, headers map[string]string, statusCode int) interface{}

func (UpdateTableRequest) Request

func (gir UpdateTableRequest) Request() (*UpdateTableResponse, error)

func (*UpdateTableRequest) VerifyInput

func (req *UpdateTableRequest) VerifyInput() error

type UpdateTableResponse

type UpdateTableResponse struct {
	TableDescription updateTableDescription
}

Jump to

Keyboard shortcuts

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