Skip to content

Commit

Permalink
cedar-go: update projections from the types package
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Jakubowski <patrick.jakubowski@strongdm.com>
  • Loading branch information
patjakdev committed Nov 8, 2024
1 parent 247a776 commit 68cac2c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,23 @@ const (
// | |__| (_) | | | \__ \ |_| | | |_| | (__| || (_) | | \__ \
// \____\___/|_| |_|___/\__|_| \__,_|\___|\__\___/|_| |___/

// DatetimeFromMillis returns a Datetime from milliseconds
func DatetimeFromMillis(ms int64) Datetime {
// NewDatetimeFromMillis returns a Datetime from milliseconds
func NewDatetimeFromMillis(ms int64) Datetime {
return types.NewDatetimeFromMillis(ms)
}

// DurationFromMillis returns a Duration from milliseconds
func DurationFromMillis(ms int64) Duration {
// NewDurationFromMillis returns a Duration from milliseconds
func NewDurationFromMillis(ms int64) Duration {
return types.NewDurationFromMillis(ms)
}

// FromStdDuration returns a Cedar Duration from a Go time.Duration
func FromStdDuration(d time.Duration) Duration {
// NewDuration returns a Cedar Duration from a Go time.Duration
func NewDuration(d time.Duration) Duration {
return types.NewDuration(d)
}

// FromStdTime returns a Cedar Datetime from a Go time.Time value
func FromStdTime(t time.Time) Datetime {
// NewDatetime returns a Cedar Datetime from a Go time.Time value
func NewDatetime(t time.Time) Datetime {
return types.NewDatetime(t)
}

Expand Down

0 comments on commit 68cac2c

Please sign in to comment.