types

package
v0.0.0-...-72e33f6 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: MIT Imports: 5 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 {
	json.RawMessage
}

func NewJSON

func NewJSON(data json.RawMessage) JSON

func (*JSON) Scan

func (dst *JSON) Scan(src any) error

func (JSON) Value

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

type Location

type Location struct {
	*time.Location
}

Location cannot be nil.

func NewLocation

func NewLocation(loc *time.Location) Location

func (*Location) MarshalJSON

func (l *Location) MarshalJSON() ([]byte, error)

func (Location) MarshalText

func (src Location) MarshalText() (text []byte, err error)

func (*Location) Scan

func (dst *Location) Scan(src any) error

func (*Location) UnmarshalJSON

func (l *Location) UnmarshalJSON(data []byte) error

func (*Location) UnmarshalText

func (dst *Location) UnmarshalText(text []byte) error

func (Location) Value

func (src Location) Value() (driver.Value, error)

type NullTime

type NullTime struct {
	Time
	Valid bool // Valid is true if Time is not NULL
}

NullTime will always UTC.

func (*NullTime) Scan

func (dst *NullTime) Scan(src any) error

func (NullTime) Value

func (src NullTime) Value() (driver.Value, error)

type StringSlice

type StringSlice struct {
	Slice []string
}

StringSlice cannot be nil.

func NewStringSlice

func NewStringSlice(slice []string) StringSlice

func (*StringSlice) Scan

func (dst *StringSlice) Scan(src any) error

func (StringSlice) Value

func (src StringSlice) Value() (driver.Value, error)

type Time

type Time struct {
	time.Time
}

Time will always UTC.

func NewTime

func NewTime(t time.Time) Time

func (*Time) Scan

func (dst *Time) Scan(src any) error

func (Time) Value

func (src Time) Value() (driver.Value, error)

type URL

type URL struct {
	*url.URL
}

URL cannot be nil.

func NewURL

func NewURL(u *url.URL) URL

func (*URL) Scan

func (dst *URL) Scan(src any) error

func (URL) Value

func (u URL) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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