get_item

package
Version: v0.0.0-...-1f046af Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2015 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Overview

Support for the DynamoDB GetItem endpoint.

example use:

tests/get_item-livestest.go

Index

Constants

View Source
const (
	ENDPOINT_NAME      = "GetItem"
	JSON_ENDPOINT_NAME = ENDPOINT_NAME + "JSON"
	GETITEM_ENDPOINT   = aws_const.ENDPOINT_PREFIX + ENDPOINT_NAME
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Get

type Get GetItem

Get is an alias for backwards compatibility

func NewGet

func NewGet() *Get

func (*Get) EndpointReq

func (get *Get) EndpointReq() ([]byte, int, error)

func (*Get) EndpointReqWithConf

func (get *Get) EndpointReqWithConf(c *conf.AWS_Conf) ([]byte, int, error)

type GetItem

type GetItem struct {
	AttributesToGet          attributestoget.AttributesToGet                   `json:",omitempty"`
	ConsistentRead           bool                                              // false is sane default
	ExpressionAttributeNames expressionattributenames.ExpressionAttributeNames `json:",omitempty"`
	Key                      item.Key
	ProjectionExpression     string `json:",omitempty"`
	ReturnConsumedCapacity   string `json:",omitempty"`
	TableName                string
}

func NewGetItem

func NewGetItem() *GetItem

func (*GetItem) EndpointReq

func (get_item *GetItem) EndpointReq() ([]byte, int, error)

func (*GetItem) EndpointReqWithConf

func (get_item *GetItem) EndpointReqWithConf(c *conf.AWS_Conf) ([]byte, int, error)

type Request

type Request GetItem

func (*Request) EndpointReq

func (req *Request) EndpointReq() ([]byte, int, error)

func (*Request) EndpointReqWithConf

func (req *Request) EndpointReqWithConf(c *conf.AWS_Conf) ([]byte, int, error)

type Response

type Response struct {
	Item             item.Item
	ConsumedCapacity *capacity.ConsumedCapacity `json:",omitempty"`
}

func NewResponse

func NewResponse() *Response

func (Response) MarshalJSON

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

func (*Response) ToResponseItemJSON

func (resp *Response) ToResponseItemJSON() (*ResponseItemJSON, error)

ToResponseItemJSON will try to convert the Response to a ResponseItemJSON, where the interface value for Item represents a structure that can be marshaled into basic JSON.

type ResponseItemJSON

type ResponseItemJSON struct {
	Item             interface{}
	ConsumedCapacity *capacity.ConsumedCapacity `json:",omitempty"`
}

ResponseItemJSON can be formed from a Response when the caller wishes to receive the Item as basic JSON.

func NewResponseItemJSON

func NewResponseItemJSON() *ResponseItemJSON

func (ResponseItemJSON) MarshalJSON

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

Source Files

Jump to

Keyboard shortcuts

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