Documentation ¶
Index ¶
- type NullTime
- func (t NullTime) MarshalJSON() ([]byte, error)
- func (t NullTime) MarshalText() ([]byte, error)
- func (t NullTime) Ptr() *time.Time
- func (t *NullTime) Scan(value interface{}) error
- func (t *NullTime) SetValid(v time.Time)
- func (t *NullTime) UnmarshalJSON(data []byte) error
- func (t *NullTime) UnmarshalText(text []byte) error
- func (t NullTime) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NullTime ¶
Time is a nullable time.Time. It supports SQL and JSON serialization. It will marshal to null if null.
func TimeFromPtr ¶
TimeFromPtr creates a new Time that will be null if t is nil.
func (NullTime) MarshalJSON ¶
MarshalJSON implements json.Marshaler. It will encode null if this time is null.
func (NullTime) MarshalText ¶
func (NullTime) Ptr ¶
Ptr returns a pointer to this Time's value, or a nil pointer if this Time is null.
func (*NullTime) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler. It supports string, object (e.g. pq.NullTime and friends) and null input.
func (*NullTime) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.