GetMovieName gets the name of the movie from an attribute value
(av map[string]*dynamodb.AttributeValue)
| 45 | |
| 46 | // GetMovieName gets the name of the movie from an attribute value |
| 47 | func GetMovieName(av map[string]*dynamodb.AttributeValue) (string, error) { |
| 48 | var item Item |
| 49 | |
| 50 | err := dynamodbattribute.UnmarshalMap(av, &item) |
| 51 | if err != nil { |
| 52 | return "", err |
| 53 | } |
| 54 | |
| 55 | return item.Title, nil |
| 56 | } |
| 57 | |
| 58 | // AddTableItem adds an item to an Amazon DynamoDB table |
| 59 | // Inputs: |
no outgoing calls