Documentation ¶
Index ¶
- type Date
- func (date *Date) GobDecode(b []byte) error
- func (date Date) GobEncode() ([]byte, error)
- func (date Date) GormDataType() string
- func (date Date) MarshalJSON() ([]byte, error)
- func (date *Date) Scan(value interface{}) (err error)
- func (date *Date) UnmarshalJSON(b []byte) error
- func (date Date) Value() (driver.Value, error)
- type Time
- func (t Time) Date(value string) time.Time
- func (Time) GormDBDataType(db *gorm.DB, field *schema.Field) string
- func (Time) GormDataType() string
- func (t Time) Hour() int
- func (t Time) IsAfter(be Time) bool
- func (t Time) IsBefore(be Time) bool
- func (t Time) MarshalJSON() ([]byte, error)
- func (t Time) MinusMinutes(amount int) Time
- func (t Time) MinusSeconds(amount int) Time
- func (t Time) Minute() int
- func (t Time) Nanoseconds() int
- func (t Time) PlusMinutes(amount int) Time
- func (t Time) PlusSeconds(amount int) Time
- func (t *Time) Scan(src interface{}) error
- func (t Time) Seconds() int
- func (t Time) String() string
- func (t *Time) UnmarshalJSON(data []byte) error
- func (t Time) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Date ¶
func (Date) GormDataType ¶
GormDataType gorm common data type
func (Date) MarshalJSON ¶
func (*Date) UnmarshalJSON ¶
type Time ¶
Time is time data type.
func (Time) GormDBDataType ¶
GormDBDataType returns gorm DB data type based on the current using database.
func (Time) GormDataType ¶
GormDataType returns gorm common data type. This type is used for the field's column type.
func (Time) MarshalJSON ¶
MarshalJSON implements json.Marshaler to convert Time to json serialization.
func (Time) MinusMinutes ¶
func (Time) MinusSeconds ¶
func (Time) Nanoseconds ¶
func (Time) PlusMinutes ¶
func (Time) PlusSeconds ¶
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler to deserialize json data.
Click to show internal directories.
Click to hide internal directories.