dynamodb

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package dynamodb contains third party interactions with aws-sdk-go/dynamodb

Index

Constants

View Source
const (

	// ErrNoPointerParameter is used when a parameter was expected to be a pointer but it wasn't
	ErrNoPointerParameter = "NoPointerParameter"

	// ErrEmptyParameter is used when a required parameter is empty
	ErrEmptyParameter = "EmptyParameter"
)
View Source
const (

	// Input represents the parameter named input
	Input = "input"
	// Output represents the parameter named output
	Output = "output"
	// Table represents the parameter named table
	Table = "table"
	// NewImage represents the parameter named input.Change.NewImage
	NewImage = "input.Change.NewImage"
	// KeyName represents the parameter named keyName
	KeyName = "keyName"
	// KeyValue represents the parameter named keyValue
	KeyValue = "keyValue"
)

Variables

This section is empty.

Functions

func NewGetItemInput

func NewGetItemInput(table, keyName, keyValue string) (*dynamodb.GetItemInput, error)

NewGetItemInput returns a new *GetItemInput

func NewPutItemInput

func NewPutItemInput(input interface{}, table string) (*dynamodb.PutItemInput, error)

NewPutItemInput returns a new *dynamodb.PutItemInput

func UnmarshalGetItemOutput

func UnmarshalGetItemOutput(input *dynamodb.GetItemOutput, out interface{}) error

UnmarshalGetItemOutput unmarshals a *dynamodb.GetItemOutput into a passed interface reference

func UnmarshalStreamImage

func UnmarshalStreamImage(input events.DynamoDBEventRecord, output interface{}) error

UnmarshalStreamImage unmarshals a events.DynamoDBEventRecord in a pointer to an interface

Types

type DynamoDB

type DynamoDB struct {
	*dynamodb.DynamoDB
}

DynamoDB embeds *dynamodb.DynamoDB

func New

func New(svc *pkgAws.Session, endpoint string) (*DynamoDB, error)

New returns a new *DynamoDB

func (*DynamoDB) DynamoGetItem

func (svc *DynamoDB) DynamoGetItem(table, keyName, keyValue string) (*GetItemOutput, error)

DynamoGetItem gets an item from DynamoDB given a key and its value. A *GetItemOutput will be returned

func (*DynamoDB) DynamoPutItem

func (svc *DynamoDB) DynamoPutItem(input interface{}, table string) error

DynamoPutItem puts a given input in a dynamodb table

type GetItemOutput

type GetItemOutput interface{}

GetItemOutput embeds *dynamodb.GetItemOutput

Jump to

Keyboard shortcuts

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