Documentation ¶
Index ¶
Constants ¶
View Source
const ( // T1Fmt is the time layout used by Adama. It is most similar to // RFC3339, which is the standard used by encoding/json for encoding and // decoding of time.Time values. it differs in that it doesn't have a // colon in the time zone specifier, which is mandated by RFC3339, but // not by ISO8601 (which this does adhere to). T1Fmt = "\"2006-01-02T15:04:05Z0700\"" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SessionTime ¶
SessionTime is a time.Time type with a different JSON-parsing format. SessionTime implements the json.Unmarshaler interface, but *not* json.Marshaler. We should never be marshaling a session time: it only exists for the /session endpoint, which is GET-only
func (SessionTime) String ¶
func (t SessionTime) String() string
String fulfills the Stringer interface.
func (*SessionTime) UnmarshalJSON ¶
func (t *SessionTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface. The time is expected to be a quoted string in RFC 3339 format, except without a time zone specifier.
type T1Time ¶
T1Time is a time.Time type with a different JSON-parsing format.
func (T1Time) MarshalJSON ¶
MarshalJSON fulfills the Marshaler interface for T1Time.
Click to show internal directories.
Click to hide internal directories.