Documentation
¶
Index ¶
- Constants
- Variables
- func SetDefaults[T any](t *T) error
- type Datetime
- func (d Datetime) AfterOrEqualTo(u time.Time) bool
- func (d Datetime) BeforeOrEqualTo(u time.Time) bool
- func (d Datetime) MarshalJSON() ([]byte, error)
- func (d Datetime) Max(datetimes ...time.Time) time.Time
- func (d Datetime) Min(datetimes ...time.Time) time.Time
- func (d *Datetime) UnmarshalJSON(b []byte) error
- type Nullable
Constants ¶
View Source
const ( MIN_DATE = "0001-01-01T00:00:00Z" MAX_DATE = "9999-12-31T23:59:59Z" DEFAULT_UUID = "00000000-0000-0000-0000-000000000000" )
Variables ¶
View Source
var (
ErrUnsupportedConversion = errors.New("unsupported type conversion")
)
Functions ¶
func SetDefaults ¶
Types ¶
type Datetime ¶
func (Datetime) AfterOrEqualTo ¶
AfterOrEqualTo return true if a date is after or equal to another date , this should be considered for time overlap (touch boundaries)
func (Datetime) BeforeOrEqualTo ¶
BeforeOrEqualTo return true if a date is before or equal to another date , this should be considered for time overlap (touch boundaries)
func (Datetime) MarshalJSON ¶
func (*Datetime) UnmarshalJSON ¶
type Nullable ¶
func DefaultIfZero ¶
func NewNullable ¶
func (Nullable[T]) MarshalJSON ¶
func (*Nullable[T]) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.