datatypes

package
v0.0.0-...-f412a0c Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package datatypes GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

View Source
var (
	UTC               = time.UTC
	CST               = time.FixedZone("CST", 8*60*60)
	TimestampZero     = Timestamp(time.Time{})
	TimestampUnixZero = Timestamp(time.Unix(0, 0))
)
View Source
var (
	DatetimeZero = Datetime(time.Time{})
)

Functions

func JSONScan

func JSONScan(dbValue any, value any) error

func JSONValue

func JSONValue(value any) (driver.Value, error)

func Scan

func Scan(b []byte, v any) error

func Value

func Value(v any) (driver.Value, error)

Types

type Bool

type Bool int
const (
	BOOL_UNKNOWN Bool = iota
	BOOL_TRUE         // true
	BOOL_FALSE        // false
)

func (Bool) MarshalJSON

func (v Bool) MarshalJSON() ([]byte, error)

func (Bool) MarshalText

func (v Bool) MarshalText() ([]byte, error)

func (Bool) OpenAPISchemaType

func (Bool) OpenAPISchemaType() []string

func (Bool) RuntimeDoc

func (Bool) RuntimeDoc(names ...string) ([]string, bool)

func (*Bool) UnmarshalJSON

func (v *Bool) UnmarshalJSON(data []byte) (err error)

func (*Bool) UnmarshalText

func (v *Bool) UnmarshalText(data []byte) (err error)

type Datetime

type Datetime time.Time

openapi:strfmt date-time

func ParseDatetimeFromString

func ParseDatetimeFromString(s string) (dt Datetime, err error)

func ParseDatetimeFromStringWithFormatterInCST

func ParseDatetimeFromStringWithFormatterInCST(s, formatter string) (dt Datetime, err error)

func (Datetime) DataType

func (Datetime) DataType(e string) string

func (Datetime) Format

func (dt Datetime) Format(layout string) string

func (Datetime) In

func (dt Datetime) In(loc *time.Location) Datetime

func (Datetime) IsZero

func (dt Datetime) IsZero() bool

func (Datetime) MarshalText

func (dt Datetime) MarshalText() ([]byte, error)

func (*Datetime) Scan

func (dt *Datetime) Scan(value interface{}) error

func (Datetime) String

func (dt Datetime) String() string

func (Datetime) Unix

func (dt Datetime) Unix() int64

func (*Datetime) UnmarshalText

func (dt *Datetime) UnmarshalText(data []byte) (err error)

func (Datetime) Value

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

type SFID

type SFID uint64

openapi:strfmt snowflake-id

func (SFID) MarshalText

func (sfID SFID) MarshalText() ([]byte, error)

func (SFID) RuntimeDoc

func (SFID) RuntimeDoc(names ...string) ([]string, bool)

func (SFID) String

func (sfID SFID) String() string

func (*SFID) UnmarshalText

func (sfID *SFID) UnmarshalText(data []byte) (err error)

type SFIDs

type SFIDs []SFID

func (SFIDs) RuntimeDoc

func (SFIDs) RuntimeDoc(names ...string) ([]string, bool)

func (SFIDs) ToUint64

func (uuids SFIDs) ToUint64() []uint64

type Timestamp

type Timestamp time.Time

openapi:strfmt date-time

func ParseTimestampFromString

func ParseTimestampFromString(s string) (dt Timestamp, err error)

func ParseTimestampFromStringWithLayout

func ParseTimestampFromStringWithLayout(input, layout string) (Timestamp, error)

func (Timestamp) DataType

func (Timestamp) DataType(engine string) string

func (Timestamp) Format

func (dt Timestamp) Format(layout string) string

func (Timestamp) In

func (dt Timestamp) In(loc *time.Location) Timestamp

func (Timestamp) IsZero

func (dt Timestamp) IsZero() bool

func (Timestamp) MarshalText

func (dt Timestamp) MarshalText() ([]byte, error)

func (*Timestamp) Scan

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

func (Timestamp) String

func (dt Timestamp) String() string

func (Timestamp) Unix

func (dt Timestamp) Unix() int64

func (*Timestamp) UnmarshalText

func (dt *Timestamp) UnmarshalText(data []byte) (err error)

func (Timestamp) Value

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

Jump to

Keyboard shortcuts

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