field

package
v1.3.8 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: MIT Imports: 7 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 []byte

func (JSON) MarshalJSON

func (j JSON) MarshalJSON() ([]byte, error)

输出转化成json触发

func (*JSON) Scan

func (j *JSON) Scan(value interface{}) error

读取db触发

func (*JSON) UnmarshalJSON

func (j *JSON) UnmarshalJSON(data []byte) error

输入转化对象触发

func (JSON) Value

func (j JSON) Value() (driver.Value, error)

写入db触发

type JSONP

type JSONP[T any] struct {
	Data T
}

func (JSONP[T]) MarshalJSON

func (j JSONP[T]) MarshalJSON() ([]byte, error)

func (*JSONP[T]) Scan

func (j *JSONP[T]) Scan(value interface{}) error

func (*JSONP[T]) UnmarshalJSON

func (j *JSONP[T]) UnmarshalJSON(data []byte) error

func (JSONP[T]) Value

func (j JSONP[T]) Value() (driver.Value, error)

type Timestamp

type Timestamp struct {
	time.Time
}

func (Timestamp) MarshalJSON

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

func (*Timestamp) Scan

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

func (*Timestamp) UnmarshalJSON

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

func (Timestamp) Value

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

Jump to

Keyboard shortcuts

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