TTL, Unix Time, and more
This release adds Table.UpdateTTL
and Table.DescribeTTL
to modify and obtain time-to-live configuration (#51).
You can also use unixtime
as a special struct tag modifier along with time.Time
to force it to encode to Unix time in seconds, which is useful for TTL expirations (#109).
type Data struct {
ID int
Expires time.Time `dynamo:",unixtime"`
Value int
}
Additionally, you can now specify custom idempotency tokens for transactions with WriteTx.IdempotentWithToken
(#95). The docs have been slightly improved as well.
Thank you @roberth-k and @greggjs for the contributions.