Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorFailedToUnmarshalRecord = "failed to unmarshal record" ErrorFailedToFetchRecord = "failed to fetch record" ErrorInvalidUserData = "invalid user data" ErrorInvalidEmail = "invalid email" ErrorCouldNotMarshalItem = "could not marshal item" ErrorCouldNotDeleteItem = "could not delete item" ErrorCouldNotDynamoPutItem = "could not dynamo put item" ErrorUserAlreadyExists = "user.User already exists" ErrorUserDoesNotExist = "user.User does not exist" )
Functions ¶
func DeleteUser ¶
func DeleteUser(req events.APIGatewayProxyRequest, tableName string, dynaClient dynamodbiface.DynamoDBAPI) error
func FetchUsers ¶
func FetchUsers(tableName string, dynaClient dynamodbiface.DynamoDBAPI) (*[]User, error)
Types ¶
type User ¶
type User struct { Email string `json:"email"` FirstName string `json:"firstName"` LastName string `json:"lastName"` }
func CreateUser ¶
func CreateUser(req events.APIGatewayProxyRequest, tableName string, dynaClient dynamodbiface.DynamoDBAPI) ( *User, error, )
func FetchUser ¶
func FetchUser(email, tableName string, dynaClient dynamodbiface.DynamoDBAPI) (*User, error)
func UpdateUser ¶
func UpdateUser(req events.APIGatewayProxyRequest, tableName string, dynaClient dynamodbiface.DynamoDBAPI) ( *User, error, )
Click to show internal directories.
Click to hide internal directories.