datetime

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSON

type JSON struct {
	time.Time
}

JSON represents time in RFC3339 format and makes that appropriate for DB structure.

func (*JSON) MarshalJSON

func (datetime *JSON) MarshalJSON() ([]byte, error)

MarshalJSON invoked when json.Marshal and returns (current) time in RFC3339.

func (*JSON) Scan

func (datetime *JSON) Scan(v interface{}) error

Scan implements sql.Scanner interface. Transforms value from DB into appropriate for struct.

func (*JSON) UnmarshalJSON

func (datetime *JSON) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON invoked when json.Unmarshal and assigns the given value to struct.

func (*JSON) Value

func (datetime *JSON) Value() (driver.Value, error)

Value implements Valuer interface. Transforms struct into value, appropriate for DB.

Jump to

Keyboard shortcuts

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