Documentation
¶
Index ¶
- func SetTimezone(timezone string)
- type Date
- func (d Date) Err() error
- func (d Date) IsZero() bool
- func (d Date) MarshalJSON() ([]byte, error)
- func (d *Date) Scan(value any) error
- func (d *Date) Set(val any) error
- func (d Date) String() string
- func (d Date) Time() time.Time
- func (d Date) ToProto() *timestamppb.Timestamp
- func (d *Date) UnmarshalJSON(data []byte) error
- func (d *Date) UnmarshalText(text []byte) error
- func (d Date) Valid() bool
- func (d Date) Validate() error
- func (d Date) Value() (driver.Value, error)
- type Datetime
- func (d Datetime) Err() error
- func (d Datetime) IsZero() bool
- func (d Datetime) MarshalJSON() ([]byte, error)
- func (d *Datetime) Scan(value any) error
- func (d *Datetime) Set(val any) error
- func (d Datetime) String() string
- func (d Datetime) Time() time.Time
- func (d Datetime) ToProto() *timestamppb.Timestamp
- func (d *Datetime) UnmarshalJSON(data []byte) error
- func (d *Datetime) UnmarshalText(text []byte) error
- func (d Datetime) Valid() bool
- func (d Datetime) Validate() error
- func (d Datetime) Value() (driver.Value, error)
- type Float
- func (f Float) Err() error
- func (f Float) Float64() float64
- func (f Float) MarshalJSON() ([]byte, error)
- func (f *Float) Scan(value any) error
- func (f *Float) Set(val any) error
- func (f Float) String() string
- func (f *Float) UnmarshalJSON(data []byte) error
- func (f *Float) UnmarshalText(text []byte) error
- func (f Float) Valid() bool
- func (f Float) Value() (driver.Value, error)
- type Integer
- func (i Integer) Err() error
- func (i Integer) Int64() int64
- func (i Integer) MarshalJSON() ([]byte, error)
- func (i *Integer) Scan(value any) error
- func (i *Integer) Set(val any) error
- func (i Integer) String() string
- func (i *Integer) UnmarshalJSON(data []byte) error
- func (i *Integer) UnmarshalText(text []byte) error
- func (i Integer) Valid() bool
- func (i Integer) Value() (driver.Value, error)
- type Validatable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetTimezone ¶ added in v0.1.16
func SetTimezone(timezone string)
SetTimezone sets datetime timezone. If timezone is invalid then the timezone is Local
Types ¶
type Date ¶
type Date struct {
// contains filtered or unexported fields
}
func DateFromProto ¶ added in v0.1.13
func DateFromProto(ts *timestamppb.Timestamp) *Date
func (Date) MarshalJSON ¶
MarshalJSON serializes the date to JSON
func (Date) ToProto ¶ added in v0.1.13
func (d Date) ToProto() *timestamppb.Timestamp
func (*Date) UnmarshalJSON ¶
UnmarshalJSON parses date from JSON string
func (*Date) UnmarshalText ¶
UnmarshalText parses date from text (e.g., query param)
type Datetime ¶
type Datetime struct {
// contains filtered or unexported fields
}
func DatetimeFromProto ¶ added in v0.1.13
func DatetimeFromProto(ts *timestamppb.Timestamp) *Datetime
func DatetimeNow ¶
func DatetimeNow() Datetime
func NewDatetime ¶
func (Datetime) MarshalJSON ¶
MarshalJSON serializes to JSON
func (Datetime) ToProto ¶ added in v0.1.13
func (d Datetime) ToProto() *timestamppb.Timestamp
func (*Datetime) UnmarshalJSON ¶
UnmarshalJSON parses from JSON string
func (*Datetime) UnmarshalText ¶
UnmarshalText parses from text (e.g. query param)
type Float ¶
type Float struct {
// contains filtered or unexported fields
}
func (Float) MarshalJSON ¶
func (*Float) UnmarshalJSON ¶
func (*Float) UnmarshalText ¶
type Integer ¶
type Integer struct {
// contains filtered or unexported fields
}
func NewInteger ¶
func (Integer) MarshalJSON ¶
func (*Integer) UnmarshalJSON ¶
func (*Integer) UnmarshalText ¶
type Validatable ¶
type Validatable interface {
Err() error
}
Click to show internal directories.
Click to hide internal directories.