utils

package
v0.0.0-...-177c536 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalItem

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

MarshalItem as a dynamodbAtributeValue

func Start

func Start(handler interface{})

Start lambda handler

func UnmarshalItem

func UnmarshalItem(result map[string]*dynamodb.AttributeValue, item interface{}) error

UnmarshalItem -

Types

type DBClient

type DBClient struct {
	// contains filtered or unexported fields
}

DBClient connection struct

func NewDBConnection

func NewDBConnection(tableName string) *DBClient

NewDBConnection -

func (*DBClient) FindUserByEmail

func (db *DBClient) FindUserByEmail(email *string) (*dynamodb.ScanOutput, error)

FindUserByEmail at DynamoDB

func (*DBClient) GetItemByID

func (db *DBClient) GetItemByID(id *string) (*dynamodb.GetItemOutput, error)

GetItemByID -

func (*DBClient) SaveItem

func (db *DBClient) SaveItem(item map[string]*dynamodb.AttributeValue) (*dynamodb.PutItemOutput, error)

SaveItem into Dynamodb

type Request

Request wraps the base API Gateway request

type Response

Response wraps the base API Gateway response

func NewResponse

func NewResponse(code int, body interface{}) (*Response, error)

NewResponse -

Jump to

Keyboard shortcuts

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