ntime

package
v3.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2023 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NullableTime

type NullableTime struct {
	// contains filtered or unexported fields
}

NullableTime represents a Time from the time package, but can have no value set

func (*NullableTime) After

func (t *NullableTime) After(u NullableTime) bool

After determines whether one time is after another.

func (*NullableTime) Get

func (t *NullableTime) Get() time.Time

Get returns the contained value. Panics if no value is set.

func (*NullableTime) HasValue

func (t *NullableTime) HasValue() bool

HasValue returns whether a time has been set

func (*NullableTime) MarshalJSON

func (t *NullableTime) MarshalJSON() ([]byte, error)

MarshalJSON serializes this struct to JSON Implements json.Marshaler interface

func (*NullableTime) Set

func (t *NullableTime) Set(newTime time.Time)

Set a time. This is the equivalent of an assignment

func (*NullableTime) UnmarshalJSON

func (t *NullableTime) UnmarshalJSON(data []byte) error

UnmarshalJSON deserializes JSON into this struct Implements json.Unmarshaler interface

func (*NullableTime) Unset

func (t *NullableTime) Unset()

Unset sets the value to nothing. This is the equivalent of assigning nil.

Jump to

Keyboard shortcuts

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