Closed apg closed 2 months ago
@philhassey I think all of your comments have been addressed.
I think this will be the next release, so maybe add in something to the README.md explaining the latest goodies in 0.3.2.
And also add some explanation as to how datetime is an accepted RFC, but it's a bit bleeding edge (as discussed in the meeting yesterday)
OK. At 100% coverage for all changes. There's one line that's not covered in cedar_unmarshal that is unrelated to my changes. I tried to figure out a quick way to reach it, but failed. :)
See merged RFC 80.
This PR adds:
datetime
andduration
type specified in RFC 80ComparableValue
s, such as Long, Datetime, Duration.This does not extend ComparableValue to Decimal, as there's no RFC / specification to make that so (doing so would be straightforward, however).
Both
datetime
andduration
are backed by an int64 and can be lifted from a Gotime.Time
and atime.Duration
respectively. It would be possible to remove the struct wrapper around the int64, as no other state is stored. We aren't doing this to prevent accidental casting / type assertions that remove the semantic meaning of these values.(Note: there was some previous discussion in the strongdm fork of this repo: https://github.com/strongdm/cedar-go/pull/3)