Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration is an alias for time.Duration that de/serialises to JSON as human-readable strings.
func (Duration) MarshalJSON ¶
func (*Duration) UnmarshalJSON ¶
func (*Duration) UnmarshalText ¶
type NullDuration ¶
NullDuration is a nullable Duration, in the same vein as the nullable types provided by package gopkg.in/guregu/null.v3.
func NewNullDuration ¶ added in v0.21.0
func NewNullDuration(d time.Duration, valid bool) NullDuration
NewNullDuration is a simple helper constructor function
func NullDurationFrom ¶
func NullDurationFrom(d time.Duration) NullDuration
Creates a valid NullDuration from a time.Duration.
func (NullDuration) MarshalJSON ¶
func (d NullDuration) MarshalJSON() ([]byte, error)
func (*NullDuration) UnmarshalJSON ¶
func (d *NullDuration) UnmarshalJSON(data []byte) error
func (*NullDuration) UnmarshalText ¶
func (d *NullDuration) UnmarshalText(data []byte) error
Click to show internal directories.
Click to hide internal directories.