update_item

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 UpdateItem endpoint.

example use:

tests/item_operations-livestest.go

Index

Constants

View Source
const (
	ENDPOINT_NAME       = "UpdateItem"
	UPDATEITEM_ENDPOINT = aws_const.ENDPOINT_PREFIX + ENDPOINT_NAME
	// the permitted Action flags for this op
	ACTION_PUT = "PUT"
	ACTION_DEL = "DELETE"
	ACTION_ADD = "ADD"
	// the permitted ReturnValues flags for this op
	RETVAL_ALL_OLD     = "ALL_OLD"
	RETVAL_ALL_NEW     = "ALL_NEW"
	RETVAL_UPDATED_OLD = "UPDATED_OLD"
	RETVAL_UPDATED_NEW = "UPDATED_NEW"
	RETVAL_NONE        = ep.RETVAL_NONE
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeAction

type AttributeAction struct {
	Value  ep.AttributeValue
	Action string
}

func (AttributeAction) MarshalJSON

func (a AttributeAction) MarshalJSON() ([]byte, error)

func (*AttributeAction) UnmarshalJSON

func (a *AttributeAction) UnmarshalJSON(data []byte) error

type AttributeUpdates

type AttributeUpdates map[string]AttributeAction

type Request

type Request Update

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 ep.AttributesResponse

func NewResponse

func NewResponse() *Response

NewResponse will return a pointer to an initialized Response struct.

type Update

type Update struct {
	TableName                   string
	Key                         ep.Item
	AttributeUpdates            AttributeUpdates
	Expected                    ep.Expected
	ReturnValues                ep.ReturnValues
	ReturnItemCollectionMetrics ep.ReturnItemCollectionMetrics
}

func NewUpdate

func NewUpdate() *Update

NewUpdate returns a pointer to an instantiation of the Update struct.

func (Update) EndpointReq

func (u Update) EndpointReq() (string, int, error)

EndpointReq implements the Endpoint interface.

func (Update) MarshalJSON

func (u Update) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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