types

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DateOnly

type DateOnly struct {
	time.Time
}

DateOnly is a custom date type with 'yyyy-mm-dd' format

func NewDateOnly

func NewDateOnly(t time.Time) DateOnly

NewDateOnly creates a new DateOnly instance

func (DateOnly) MarshalJSON

func (cd DateOnly) MarshalJSON() ([]byte, error)

func (*DateOnly) Scan

func (cd *DateOnly) Scan(value interface{}) error

func (*DateOnly) UnmarshalJSON

func (cd *DateOnly) UnmarshalJSON(b []byte) error

func (DateOnly) Value

func (cd DateOnly) Value() (driver.Value, error)

type TimeOnly

type TimeOnly struct {
	time.Time
}

TimeOnly is a custom date type with 'yyyy-mm-dd' format

func (TimeOnly) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface for TimeOnly

func (*TimeOnly) Scan

func (t *TimeOnly) Scan(value interface{}) error

func (*TimeOnly) UnmarshalJSON

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

UnmarshalJSON implements the json.Unmarshaler interface for TimeOnly

func (TimeOnly) Value

func (t TimeOnly) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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