Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHiGreaterThanLo = validation.NewError(
"window_hi_must_be_greater_than_lo",
"the window hi value must be greater than the lo value",
)
ErrHiGreaterThanLo is the validation check error returned when the window hi is before the lo.
View Source
var ErrLoMustBeNewerThanUnixEpoch = validation.NewError( "window_lo_must_be_newer_than_unix_epoch", fmt.Sprintf("the window lo value must be newer than %s", unixEpoch), )
ErrLoMustBeNewerThanUnixEpoch is the validation check error returned when the window is before the unix epoch (Jan 1st, 1970).
Functions ¶
This section is empty.
Types ¶
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func New ¶
func New(lo, hi time.Time) (Window, validation.ErrorGroup)
New creates and validates a new Window from the given values.
func (Window) Check ¶
func (w Window) Check() validation.ErrorGroup
Check runs default validation checks for the Window.
func (Window) Equals ¶
Equals compares two Window instances for equality.
Interface: comparison.Equaler
Click to show internal directories.
Click to hide internal directories.