Beispiel #1
0
func NewScan() *Scan {
	s := new(Scan)
	s.AttributesToGet = attributestoget.NewAttributesToGet()
	s.ExclusiveStartKey = attributevalue.NewAttributeValueMap()
	s.ExpressionAttributeNames = expressionattributenames.NewExpressionAttributeNames()
	s.ExpressionAttributeValues = attributevalue.NewAttributeValueMap()
	s.ScanFilter = condition.NewConditions()
	return s
}
Beispiel #2
0
// NewQuery returns a pointer to an instantiation of the Query struct.
func NewQuery() *Query {
	q := new(Query)
	q.AttributesToGet = attributestoget.NewAttributesToGet()
	q.ExclusiveStartKey = attributevalue.NewAttributeValueMap()
	q.ExpressionAttributeNames = expressionattributenames.NewExpressionAttributeNames()
	q.ExpressionAttributeValues = attributevalue.NewAttributeValueMap()
	q.KeyConditions = condition.NewConditions()
	q.QueryFilter = condition.NewConditions()
	return q
}
func NewAttributesResponse() *AttributesResponse {
	a := new(AttributesResponse)
	a.Attributes = attributevalue.NewAttributeValueMap()
	a.ConsumedCapacity = capacity.NewConsumedCapacity()
	a.ItemCollectionMetrics = itemcollectionmetrics.NewItemCollectionMetrics()
	return a
}
Beispiel #4
0
func NewResponse() *Response {
	r := new(Response)
	r.ConsumedCapacity = capacity.NewConsumedCapacity()
	r.Items = make([]item.Item, 0)
	r.LastEvaluatedKey = attributevalue.NewAttributeValueMap()
	return r
}
Beispiel #5
0
// NewPutJSON will return a pointer to an initialized PutItemJSON struct.
func NewPutItemJSON() *PutItemJSON {
	p := new(PutItemJSON)
	p.Expected = expected.NewExpected()
	p.ExpressionAttributeNames = expressionattributenames.NewExpressionAttributeNames()
	p.ExpressionAttributeValues = attributevalue.NewAttributeValueMap()
	return p
}
Beispiel #6
0
func NewDeleteItem() *DeleteItem {
	u := new(DeleteItem)
	u.Expected = expected.NewExpected()
	u.ExpressionAttributeNames = expressionattributenames.NewExpressionAttributeNames()
	u.ExpressionAttributeValues = attributevalue.NewAttributeValueMap()
	u.Key = item.NewKey()
	return u
}
Beispiel #7
0
func NewKey() Key {
	a := attributevalue.NewAttributeValueMap()
	return Key(a)
}
Beispiel #8
0
// Item is already a reference type
func NewItem() Item {
	a := attributevalue.NewAttributeValueMap()
	return Item(a)
}
func NewItemCollectionMetrics() *ItemCollectionMetrics {
	i := new(ItemCollectionMetrics)
	i.ItemCollectionKey = attributevalue.NewAttributeValueMap()
	return i
}