awsutils

package
v0.0.0-...-7a84625 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DynamoClient that is dynamodb local aware or region waterfall
	DynamoClient = &atomicData{}
	// AwsSess session for non dynamo services
	AwsSess = &atomicData{}

	// DynamoPlatformTableName {APP_STAGE}-Platform
	DynamoPlatformTableName string
)

Functions

func GetDynamoClient

func GetDynamoClient() *dynamodb.DynamoDB

GetDynamoClient get Dynamo DB Client TODO: should I be returning dynamodb.DynamoDB pointer here?

func GetItem

func GetItem(input *dynamodb.GetItemInput) (*dynamodb.GetItemOutput, error)

GetItem wraps dynamo.GetItem. Gives us opportunity to react to issues and do fail-over

func LogAwsErr

func LogAwsErr(err error)

LogAwsErr log out aws error and code

func MarshalMap

func MarshalMap(in interface{}) (map[string]*dynamodb.AttributeValue, error)

MarshalMap is an alias for dynamodbattribute.MarshalMap It will log if there is an error in the Marshal process (which should always be logged)

func PutItem

func PutItem(input *dynamodb.PutItemInput) (*dynamodb.PutItemOutput, error)

PutItem wraps dynamo.PutItem. Gives us opportunity to react to issues and do fail-over

func Query

func Query(input *dynamodb.QueryInput) (*dynamodb.QueryOutput, error)

Query wrapper

func UnmarshalListOfMaps

func UnmarshalListOfMaps(l []map[string]*dynamodb.AttributeValue, out interface{}) error

UnmarshalListOfMaps wrapper

func UnmarshalMap

func UnmarshalMap(m map[string]*dynamodb.AttributeValue, out interface{}) error

UnmarshalMap is an alias for dynamodbattribute.UnmarshalMap It will log if there is an error in the Unmarshal process (which should always be logged)

Types

This section is empty.

Jump to

Keyboard shortcuts

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