types

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Date

type Date struct {
	// contains filtered or unexported fields
}

func NewDate added in v0.1.4

func NewDate(value time.Time) Date

func (Date) Err added in v0.1.4

func (d Date) Err() error

func (Date) IsZero added in v0.1.4

func (d Date) IsZero() bool

func (Date) MarshalJSON

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

MarshalJSON serializes the date to JSON

func (*Date) Scan

func (d *Date) Scan(value any) error

Scan implements sql.Scanner

func (*Date) Set added in v0.1.4

func (d *Date) Set(val any) error

Set assigns a value to Date, accepts time.Time or string

func (Date) String

func (d Date) String() string

func (Date) Time

func (d Date) Time() time.Time

func (*Date) UnmarshalJSON

func (d *Date) UnmarshalJSON(data []byte) error

UnmarshalJSON parses date from JSON string

func (*Date) UnmarshalText

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

UnmarshalText parses date from text (e.g., query param)

func (Date) Valid added in v0.1.4

func (d Date) Valid() bool

func (Date) Validate added in v0.1.4

func (d Date) Validate() error

func (Date) Value

func (d Date) Value() (driver.Value, error)

Value for sql.Valuer

type Datetime

type Datetime struct {
	// contains filtered or unexported fields
}

func NewDatetime added in v0.1.4

func NewDatetime(value time.Time) Datetime

func (Datetime) Err added in v0.1.4

func (d Datetime) Err() error

func (Datetime) IsZero added in v0.1.4

func (d Datetime) IsZero() bool

func (Datetime) MarshalJSON

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

MarshalJSON serializes to JSON

func (*Datetime) Scan

func (d *Datetime) Scan(value any) error

Scan implements sql.Scanner

func (*Datetime) Set added in v0.1.4

func (d *Datetime) Set(val any) error

Set assigns a value to Datetime, accepts string or time.Time

func (Datetime) String

func (d Datetime) String() string

func (Datetime) Time

func (d Datetime) Time() time.Time

func (*Datetime) UnmarshalJSON

func (d *Datetime) UnmarshalJSON(data []byte) error

UnmarshalJSON parses from JSON string

func (*Datetime) UnmarshalText

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

UnmarshalText parses from text (e.g. query param)

func (Datetime) Valid added in v0.1.4

func (d Datetime) Valid() bool

func (Datetime) Validate added in v0.1.4

func (d Datetime) Validate() error

func (Datetime) Value

func (d Datetime) Value() (driver.Value, error)

Value for sql.Valuer

type Float

type Float struct {
	// contains filtered or unexported fields
}

func NewFloat added in v0.1.4

func NewFloat(value float64) Float

func (Float) Err added in v0.1.4

func (f Float) Err() error

func (Float) Float64 added in v0.1.4

func (f Float) Float64() float64

func (Float) MarshalJSON

func (f Float) MarshalJSON() ([]byte, error)

func (*Float) Scan

func (f *Float) Scan(value any) error

func (*Float) Set

func (f *Float) Set(val any) error

func (Float) String

func (f Float) String() string

func (*Float) UnmarshalJSON

func (f *Float) UnmarshalJSON(data []byte) error

func (*Float) UnmarshalText

func (f *Float) UnmarshalText(text []byte) error

func (Float) Valid added in v0.1.4

func (f Float) Valid() bool

func (Float) Value

func (f Float) Value() (driver.Value, error)

type Integer

type Integer struct {
	// contains filtered or unexported fields
}

func NewInteger added in v0.1.4

func NewInteger(value int64) Integer

func (Integer) Err added in v0.1.4

func (i Integer) Err() error

func (Integer) Int64 added in v0.1.4

func (i Integer) Int64() int64

func (Integer) MarshalJSON

func (i Integer) MarshalJSON() ([]byte, error)

func (*Integer) Scan

func (i *Integer) Scan(value any) error

func (*Integer) Set

func (i *Integer) Set(val any) error

func (Integer) String

func (i Integer) String() string

func (*Integer) UnmarshalJSON

func (i *Integer) UnmarshalJSON(data []byte) error

func (*Integer) UnmarshalText

func (i *Integer) UnmarshalText(text []byte) error

func (Integer) Valid added in v0.1.4

func (i Integer) Valid() bool

func (Integer) Value

func (i Integer) Value() (driver.Value, error)

type Validatable added in v0.1.4

type Validatable interface {
	Err() error
}

Jump to

Keyboard shortcuts

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