You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
734 B
31 lines
734 B
package list
|
|
|
|
import "github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
|
|
|
|
type List struct {
|
|
Pk string `dynamodbav:"pk"`
|
|
Id string `json:"id"`
|
|
CreatedAt int64 `json:"created_at"`
|
|
CreatedBy string `json:"created_by"`
|
|
Format string `json:"format"`
|
|
Breaks []bool `json:"breaks"`
|
|
NA []string `json:"na"`
|
|
APAC []string `json:"apac"`
|
|
Combined []string `json:"combined"`
|
|
}
|
|
|
|
func (u *List) buildKeys() {
|
|
u.Pk = "list#" + u.Id
|
|
}
|
|
|
|
func (u *List) getKey() map[string]types.AttributeValue {
|
|
u.buildKeys()
|
|
k := make(map[string]types.AttributeValue)
|
|
k["pk"] = &types.AttributeValueMemberS{Value: u.Pk}
|
|
return k
|
|
}
|
|
|
|
func (u *List) getGsi() map[string]types.AttributeValue {
|
|
return nil
|
|
}
|