Documentation ¶
Index ¶
- Constants
- Variables
- func UnmarshalExtra(ext url.Values, v interface{}) error
- type Address
- type Binary
- type Capacity
- type CommaSplitInts
- type CommaSplitStrings
- type Datetime
- func (Datetime) DataType(engine string) string
- func (t Datetime) Format(layout string) string
- func (t Datetime) In(loc *time.Location) Datetime
- func (t Datetime) IsZero() bool
- func (t Datetime) MarshalText() ([]byte, error)
- func (t *Datetime) Scan(value interface{}) error
- func (t *Datetime) Set(_t time.Time)
- func (t Datetime) String() string
- func (t *Datetime) UnmarshalText(data []byte) (err error)
- func (t Datetime) Value() (driver.Value, error)
- type DefaultSetter
- type Duration
- type Endpoint
- func (e Endpoint) Host() string
- func (e Endpoint) IsTLS() bool
- func (e Endpoint) IsZero() bool
- func (e Endpoint) MarshalText() ([]byte, error)
- func (e Endpoint) SchemeHost() string
- func (e Endpoint) SecurityString() string
- func (e Endpoint) String() string
- func (e *Endpoint) UnmarshalText(text []byte) error
- type GB
- type Hour
- type Initializer
- type InitializerWith
- type KB
- type MB
- type Microsecond
- type Millisecond
- type Minute
- type Named
- type Nanosecond
- type Password
- type Perm
- type SFID
- type SFIDs
- type Second
- type SecurityString
- type Signal
- type Span
- type SqlValue
- type String
- type TextMarshaler
- type TextUnmarshaler
- type Timestamp
- func (Timestamp) DataType(engine string) string
- func (t Timestamp) Format(layout string) string
- func (t Timestamp) In(loc *time.Location) Timestamp
- func (t Timestamp) IsZero() bool
- func (t Timestamp) MarshalText() ([]byte, error)
- func (t *Timestamp) Scan(value interface{}) error
- func (t *Timestamp) Set(_t time.Time)
- func (t Timestamp) String() string
- func (t Timestamp) Unix() int64
- func (t *Timestamp) UnmarshalText(data []byte) (err error)
- func (t Timestamp) Value() (driver.Value, error)
- type UID
- type UIDs
- type ValidatedInitializer
- type ZeroChecker
Constants ¶
View Source
const AddressSchemeName = "asset"
View Source
const (
DatetimeFormat = time.RFC3339
)
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 ( RTypeString = reflect.TypeOf((*String)(nil)).Elem() RTypeSecurityString = reflect.TypeOf((*SecurityString)(nil)).Elem() RTypeNamed = reflect.TypeOf((*Named)(nil)).Elem() RTypeTextMarshaler = reflect.TypeOf((*TextMarshaler)(nil)).Elem() RTypeTextUnmarshaler = reflect.TypeOf((*TextUnmarshaler)(nil)).Elem() RTypeDefaultSetter = reflect.TypeOf((*DefaultSetter)(nil)).Elem() RTypeInitializer = reflect.TypeOf((*Initializer)(nil)).Elem() RTypeValidatedInitializer = reflect.TypeOf((*ValidatedInitializer)(nil)).Elem() RTypeInitializerWith = reflect.TypeOf((*InitializerWith)(nil)).Elem() )
Types
View Source
var (
DatetimeZero = Datetime{time.Time{}}
)
Functions ¶
func UnmarshalExtra ¶
Types ¶
type CommaSplitInts ¶
type CommaSplitInts []int64
func (CommaSplitInts) MarshalText ¶
func (s CommaSplitInts) MarshalText() (data []byte, err error)
func (*CommaSplitInts) UnmarshalText ¶
func (s *CommaSplitInts) UnmarshalText(text []byte) error
type CommaSplitStrings ¶
type CommaSplitStrings []string
func (CommaSplitStrings) MarshalText ¶
func (s CommaSplitStrings) MarshalText() ([]byte, error)
func (*CommaSplitStrings) UnmarshalText ¶
func (s *CommaSplitStrings) UnmarshalText(text []byte) error
type Datetime ¶
openapi:strfmt date-time
func AsDatetime ¶
func ParseDatetimeFromString ¶
func (Datetime) MarshalText ¶
func (*Datetime) UnmarshalText ¶
type DefaultSetter ¶
type DefaultSetter interface{ SetDefault() }
type Endpoint ¶
type Endpoint struct { Scheme string Hostname string Port uint16 Base string Username string Password Password Param url.Values }
func ParseEndpoint ¶
func (Endpoint) MarshalText ¶
func (Endpoint) SchemeHost ¶
func (Endpoint) SecurityString ¶
func (*Endpoint) UnmarshalText ¶
type Initializer ¶
type Initializer interface{ Init() }
type InitializerWith ¶
type InitializerWith interface{ Init(interface{}) }
type Microsecond ¶
type Microsecond int64
func Microseconds ¶
func Microseconds(v int64) *Microsecond
func (Microsecond) Duration ¶
func (us Microsecond) Duration() time.Duration
func (Microsecond) Int ¶
func (us Microsecond) Int() int64
func (Microsecond) Literal ¶
func (us Microsecond) Literal() string
func (Microsecond) MarshalText ¶
func (us Microsecond) MarshalText() ([]byte, error)
func (Microsecond) Span ¶
func (us Microsecond) Span() Span
func (Microsecond) String ¶
func (us Microsecond) String() string
func (*Microsecond) UnmarshalText ¶
func (us *Microsecond) UnmarshalText(text []byte) error
type Millisecond ¶
type Millisecond int64
func Milliseconds ¶
func Milliseconds(s int64) *Millisecond
func (Millisecond) Duration ¶
func (ms Millisecond) Duration() time.Duration
func (Millisecond) Int ¶
func (ms Millisecond) Int() int64
func (Millisecond) Literal ¶
func (ms Millisecond) Literal() string
func (Millisecond) MarshalText ¶
func (ms Millisecond) MarshalText() ([]byte, error)
func (Millisecond) Span ¶
func (ms Millisecond) Span() Span
func (Millisecond) String ¶
func (ms Millisecond) String() string
func (*Millisecond) UnmarshalText ¶
func (ms *Millisecond) UnmarshalText(text []byte) error
type Nanosecond ¶
type Nanosecond int64
func Nanoseconds ¶
func Nanoseconds(v int64) *Nanosecond
func (Nanosecond) Duration ¶
func (ns Nanosecond) Duration() time.Duration
func (Nanosecond) Int ¶
func (ns Nanosecond) Int() int64
func (Nanosecond) Literal ¶
func (ns Nanosecond) Literal() string
func (Nanosecond) MarshalText ¶
func (ns Nanosecond) MarshalText() ([]byte, error)
func (Nanosecond) Span ¶
func (ns Nanosecond) Span() Span
func (Nanosecond) String ¶
func (ns Nanosecond) String() string
func (*Nanosecond) UnmarshalText ¶
func (ns *Nanosecond) UnmarshalText(text []byte) error
type SecurityString ¶
type SecurityString interface{ SecurityString() string }
type Span ¶
type Span interface { // Duration returns common duration value as `time.Duration` Duration() time.Duration // Int returns an integer value, such as int64(Span.Duration()) Int() int64 // String returns a duration formatted string, commonly call Span.Duration().String() // eg: Second(1).String() returns `"1s"` String() string // Literal returns a string presents an integer value regardless of time unit // eg: Second(1).Literal() returns `"1"` Literal() string // Span Span() Span TextMarshaler TextUnmarshaler }
Span defines a time duration
type TextMarshaler ¶
type TextMarshaler = encoding.TextMarshaler
type TextUnmarshaler ¶
type TextUnmarshaler = encoding.TextUnmarshaler
type Timestamp ¶
openapi:strfmt date-time
func AsTimestamp ¶
func (Timestamp) MarshalText ¶
func (*Timestamp) UnmarshalText ¶
type ValidatedInitializer ¶
type ValidatedInitializer interface{ Init() error }
type ZeroChecker ¶
type ZeroChecker interface{ IsZero() bool }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.