jsontypes

package
v0.0.0-...-efbb2fe Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Duration

type Duration time.Duration

func ParseDuration

func ParseDuration(s string) (Duration, error)

func (Duration) Duration

func (d Duration) Duration() time.Duration

func (Duration) MarshalJSON

func (d Duration) MarshalJSON() ([]byte, error)

func (*Duration) PGInterval

func (d *Duration) PGInterval() pgtype.Interval

func (Duration) String

func (d Duration) String() string

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(b []byte) error

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(n *yaml.Node) error

type Location

type Location struct {
	json.RawMessage
}

type Metadata

type Metadata map[string]any

type String

type String string

This type is used when we should unmarshal even values that are valid as another type into a string.

func (String) String

func (s String) String() string

func (*String) StringPtr

func (s *String) StringPtr() *string

func (*String) UnmarshalJSON

func (s *String) UnmarshalJSON(data []byte) error

type Time

type Time time.Time

func ParseAny

func ParseAny(s string, opt ...dateparse.ParserOption) (Time, error)

func ParseLocal

func ParseLocal(s string, opt ...dateparse.ParserOption) (Time, error)

func TimePtrFromTSTZ

func TimePtrFromTSTZ(t pgtype.Timestamptz) *Time

func (Time) MarshalJSON

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

func (*Time) PGTypeTSTZ

func (t *Time) PGTypeTSTZ() pgtype.Timestamptz

func (Time) String

func (t Time) String() string

func (Time) Time

func (t Time) Time() time.Time

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(b []byte) error

func (*Time) UnmarshalYAML

func (t *Time) UnmarshalYAML(n *yaml.Node) error

type URL

type URL url.URL

func (*URL) URL

func (u *URL) URL() url.URL

func (*URL) UnmarshalJSON

func (u *URL) UnmarshalJSON(b []byte) error

func (*URL) UnmarshalText

func (u *URL) UnmarshalText(t []byte) error

func (*URL) UnmarshalYAML

func (u *URL) UnmarshalYAML(n *yaml.Node) error

type UUID

type UUID uuid.UUID

func (*UUID) MarshalJSON

func (u *UUID) MarshalJSON() ([]byte, error)

func (UUID) UUID

func (u UUID) UUID() uuid.UUID

func (*UUID) UnmarshalJSON

func (u *UUID) UnmarshalJSON(b []byte) error

func (*UUID) UnmarshalText

func (u *UUID) UnmarshalText(t []byte) error

type UUIDs

type UUIDs []UUID

func (*UUIDs) UUIDs

func (u *UUIDs) UUIDs() uuid.UUIDs

func (*UUIDs) UnmarshalJSON

func (u *UUIDs) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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