Documentation
¶
Index ¶
- type NullTime
- func (t NullTime) Equals(other NullTime) bool
- func (t NullTime) MarshalJSON() ([]byte, error)
- func (t NullTime) MarshalText() (text []byte, err error)
- func (t *NullTime) Scan(src interface{}) error
- func (t NullTime) String() string
- func (t *NullTime) UnmarshalJSON(data []byte) error
- func (t *NullTime) UnmarshalText(text []byte) error
- func (t NullTime) Value() (driver.Value, error)
- type Time
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullTime ¶
NullTime is a nullable Time.
func MustParseNullTime ¶
MustParseNullTime parses the given time or panics.
func ParseNullTime ¶
ParseNullTime tries to parse the given time.
func (NullTime) Equals ¶
Equals returns true if this Time and the given Time are equal. If they are both null it will return true.
func (NullTime) MarshalJSON ¶
MarshalJSON implements the JSON Marshaler interface. Encodes to hh:mm:ss and omits the seconds if 0. Encodes to null if null.
func (NullTime) MarshalText ¶
MarshalText implements the encoding TextMarshaler interface. Encodes to hh:mm:ss and omits the seconds if 0. Encodes to an empty string if null.
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON implements the JSON Unmarshaler interface. Empty strings and "null" will be considered null.
func (*NullTime) UnmarshalText ¶
UnmarshalText implements the encoding TextUnmarshaler interface. Empty strings and "null" will be considered null.
type Time ¶
Time represents an SQL TIME value.
func MustParseTime ¶
MustParseTime parses the given time or panics.
func (Time) Equals ¶
Equals returns true if this Time and the given Time are equal. If they are both null it will return true.
func (Time) MarshalText ¶
MarshalText implements the encoding TextMarshaler interface. Encodes to hh:mm:ss and omits the seconds if 0.
func (*Time) UnmarshalText ¶
UnmarshalText implements the encoding TextUnmarshaler interface.