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 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
type Response ¶
type Response struct { Item item.Item ConsumedCapacity *capacity.ConsumedCapacity `json:",omitempty"` }
func NewResponse ¶
func NewResponse() *Response
func (Response) MarshalJSON ¶
Some work required to omit empty ConsumedCapacity fields
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)
Some work required to omit empty ConsumedCapacity fields
Click to show internal directories.
Click to hide internal directories.