Documentation ¶
Overview ¶
Package types contains useful custom types that are common across the WebPA application. In particular, better JSON support for some of the more advance golang types is provided.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Duration ¶
Duration is an extension of time.Duration that provides prettier JSON support
func (Duration) MarshalJSON ¶
MarshalJSON produces a formatted string of the form produced by time.Duration.String()
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON permits either: (1) strings of the form accepted by time.ParseDuration(), or (2) numeric time values, which are assumed to be nanoseconds.
Click to show internal directories.
Click to hide internal directories.