forked from dynport/gocloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update_item.go
23 lines (19 loc) · 966 Bytes
/
update_item.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package dynamodb
import "reflect"
type UpdateItem struct {
AttributeUpdates map[string]*AttributeUpdate `json:"AttributeUpdate"`
Expected *Expected `json:"Expected"`
Key *Item `json:"Key"`
ReturnConsumedCapacity string `json:"ReturnConsumedCapacity"` // "string",
ReturnItemCollectionMetrics string `json:"ReturnItemCollectionMetrics"` // "string",
ReturnValues string `json:"ReturnValues"` // "string",
TableName string `json:"TableName"` // "string"
}
type AttributeUpdate struct {
Action string `json:"Action"`
Value *ItemDefinition `json:"ItemDefinition,omitempty"`
}
func init() {
ad := &AttributeDefinition{}
reflect.ValueOf(ad).FieldByName("Action").Set(reflect.ValueOf("PUT"))
}