t1time

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2020 License: Apache-2.0 Imports: 1 Imported by: 2

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

type SessionTime time.Time

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

type T1Time time.Time

T1Time is a time.Time type with a different JSON-parsing format.

func (T1Time) MarshalJSON

func (t T1Time) MarshalJSON() ([]byte, error)

MarshalJSON fulfills the Marshaler interface for T1Time.

func (T1Time) String

func (t T1Time) String() string

String fulfills the Stringer interface.

func (*T1Time) UnmarshalJSON

func (t *T1Time) 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 the colon in the time zone specifier.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL