Documentation ¶
Index ¶
- type Bool
- func (v Bool) Bool() bool
- func (v Bool) MarshalJSON() ([]byte, error)
- func (v *Bool) Scan(x interface{}) (err error)
- func (v *Bool) Set(x interface{}) (err error)
- func (v Bool) String() string
- func (v *Bool) UnmarshalJSON(data []byte) error
- func (v Bool) Value() (driver.Value, error)
- func (v Bool) Weak() interface{}
- type ErrInvalidGenericValue
- type Float
- func (v Float) Float32() float32
- func (v Float) Float64() float64
- func (v Float) MarshalJSON() ([]byte, error)
- func (v *Float) Scan(x interface{}) (err error)
- func (v *Float) Set(x interface{}) (err error)
- func (v Float) String() string
- func (v *Float) UnmarshalJSON(data []byte) error
- func (v Float) Value() (driver.Value, error)
- func (v Float) Weak() interface{}
- type Int
- func (v Int) Int() int
- func (v Int) Int32() int32
- func (v Int) Int64() int64
- func (v Int) MarshalJSON() ([]byte, error)
- func (v *Int) Scan(x interface{}) (err error)
- func (v *Int) Set(x interface{}) (err error)
- func (v Int) String() string
- func (v *Int) UnmarshalJSON(data []byte) error
- func (v Int) Value() (driver.Value, error)
- func (v Int) Weak() interface{}
- type String
- func (v String) MarshalJSON() ([]byte, error)
- func (v *String) Scan(x interface{}) (err error)
- func (v *String) Set(x interface{}) (err error)
- func (v String) String() string
- func (v *String) UnmarshalJSON(data []byte) error
- func (v String) Value() (driver.Value, error)
- func (v String) Weak() interface{}
- type Time
- func (v Time) MarshalJSON() ([]byte, error)
- func (v *Time) Scan(x interface{}) (err error)
- func (v *Time) Set(x interface{}) (err error)
- func (v Time) String() string
- func (v Time) Time() time.Time
- func (v *Time) UnmarshalJSON(data []byte) error
- func (v Time) Value() (driver.Value, error)
- func (v Time) Weak() interface{}
- type Timestamp
- func (v Timestamp) Int() int
- func (v Timestamp) Int64() int64
- func (v Timestamp) MarshalJSON() ([]byte, error)
- func (v *Timestamp) Scan(x interface{}) (err error)
- func (v *Timestamp) Set(x interface{}) (err error)
- func (v Timestamp) String() string
- func (v Timestamp) Time() time.Time
- func (v *Timestamp) UnmarshalJSON(data []byte) error
- func (v Timestamp) Value() (driver.Value, error)
- func (v Timestamp) Weak() interface{}
- type TimestampMS
- func (v TimestampMS) Int() int
- func (v TimestampMS) Int64() int64
- func (v TimestampMS) MarshalJSON() ([]byte, error)
- func (v *TimestampMS) Scan(x interface{}) (err error)
- func (v *TimestampMS) Set(x interface{}) (err error)
- func (v TimestampMS) String() string
- func (v TimestampMS) Time() time.Time
- func (v *TimestampMS) UnmarshalJSON(data []byte) error
- func (v TimestampMS) Value() (driver.Value, error)
- func (v TimestampMS) Weak() interface{}
- type TimestampNano
- func (v TimestampNano) Int() int
- func (v TimestampNano) Int64() int64
- func (v TimestampNano) MarshalJSON() ([]byte, error)
- func (v *TimestampNano) Scan(x interface{}) (err error)
- func (v *TimestampNano) Set(x interface{}) (err error)
- func (v TimestampNano) String() string
- func (v TimestampNano) Time() time.Time
- func (v *TimestampNano) UnmarshalJSON(data []byte) error
- func (v TimestampNano) Value() (driver.Value, error)
- func (v TimestampNano) Weak() interface{}
- type Type
- type URL
- func (v URL) EscapedPath() string
- func (v URL) Hostname() string
- func (v URL) IsAbs() bool
- func (v URL) MarshalJSON() ([]byte, error)
- func (v URL) Parse(ref string) (result URL, err error)
- func (v URL) Port() string
- func (v URL) Query() url.Values
- func (v URL) RequestURI() string
- func (v URL) ResolveReference(ref *url.URL) URL
- func (v *URL) Scan(x interface{}) (err error)
- func (v *URL) Set(x interface{}) (err error)
- func (v URL) String() string
- func (v URL) URL() *url.URL
- func (v *URL) UnmarshalJSON(data []byte) error
- func (v URL) Value() (driver.Value, error)
- func (v URL) Weak() interface{}
- type Uint
- func (v Uint) MarshalJSON() ([]byte, error)
- func (v *Uint) Scan(x interface{}) (err error)
- func (v *Uint) Set(x interface{}) (err error)
- func (v Uint) String() string
- func (v Uint) Uint() uint
- func (v Uint) Uint32() uint32
- func (v Uint) Uint64() uint64
- func (v *Uint) UnmarshalJSON(data []byte) error
- func (v Uint) Value() (driver.Value, error)
- func (v Uint) Weak() interface{}
- type ValidFlag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bool ¶
type Bool struct { ValidFlag // contains filtered or unexported fields }
Bool is generic boolean type structure
func MarshalBool ¶
MarshalBool return generic.Bool converting of request data
func MustBool ¶
func MustBool(x interface{}) Bool
MustBool return generic.Bool converting of request data
func (Bool) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type ErrInvalidGenericValue ¶
type ErrInvalidGenericValue struct {
Value interface{}
}
ErrInvalidGenericValue is used as error in generic types
func (ErrInvalidGenericValue) Error ¶
func (e ErrInvalidGenericValue) Error() string
Error returns error message
type Float ¶
type Float struct { ValidFlag // contains filtered or unexported fields }
Float is generic float type structure
func MarshalFloat ¶
MarshalFloat return generic.Float converting of request data
func MustFloat ¶
func MustFloat(x interface{}) Float
MustFloat return generic.Float converting of request data
func (Float) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Float) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Int ¶
type Int struct { ValidFlag // contains filtered or unexported fields }
Int is generic integer type structure
func MarshalInt ¶
MarshalInt return generic.Int converting of request data
func MustInt ¶
func MustInt(x interface{}) Int
MustInt return generic.Int converting of request data
func (Int) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Int) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type String ¶
type String struct { ValidFlag // contains filtered or unexported fields }
String is generic string type structure
func MarshalString ¶
MarshalString return generic.String converting of request data
func MustString ¶
func MustString(x interface{}) String
MustString return generic.String converting of request data
func (String) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*String) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Time ¶
type Time struct { ValidFlag // contains filtered or unexported fields }
Time is generic time type structure
func MarshalTime ¶
MarshalTime return generic.Time converting of request data
func MustTime ¶
func MustTime(x interface{}) Time
MustTime return generic.Time converting of request data
func (Time) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Time) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Timestamp ¶
type Timestamp struct { ValidFlag // contains filtered or unexported fields }
Timestamp is a wrapped time type structure
func MarshalTimestamp ¶
MarshalTimestamp return generic.Timestamp converting of request data
func MustTimestamp ¶
func MustTimestamp(x interface{}) Timestamp
MustTimestamp return generic.Timestamp converting of request data
func (Timestamp) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Timestamp) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type TimestampMS ¶
type TimestampMS struct { ValidFlag // contains filtered or unexported fields }
TimestampMS is a wrapped time type structure
func MarshalTimestampMS ¶
func MarshalTimestampMS(x interface{}) (TimestampMS, error)
MarshalTimestampMS returns generic.TimestampMS converting of request data
func MustTimestampMS ¶
func MustTimestampMS(x interface{}) TimestampMS
MustTimestampMS returns generic.TimestampMS converting of request data
func (TimestampMS) MarshalJSON ¶
func (v TimestampMS) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*TimestampMS) Scan ¶
func (v *TimestampMS) Scan(x interface{}) (err error)
Scan implements the sql.Scanner interface.
func (*TimestampMS) Set ¶
func (v *TimestampMS) Set(x interface{}) (err error)
Set sets a specified value.
func (TimestampMS) String ¶
func (v TimestampMS) String() string
String implements the Stringer interface.
func (*TimestampMS) UnmarshalJSON ¶
func (v *TimestampMS) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
func (TimestampMS) Value ¶
func (v TimestampMS) Value() (driver.Value, error)
Value returns timestamp with milliseconds, but if TimestampMS.ValidFlag is false, returns nil.
func (TimestampMS) Weak ¶
func (v TimestampMS) Weak() interface{}
Weak returns timestamp int value, but if TimestampMS.ValidFlag is false, returns nil.
type TimestampNano ¶
type TimestampNano struct { ValidFlag // contains filtered or unexported fields }
TimestampNano is a wrapped time type structure
func MarshalTimestampNano ¶
func MarshalTimestampNano(x interface{}) (TimestampNano, error)
MarshalTimestampNano returns generic.TimestampNano converting of request data
func MustTimestampNano ¶
func MustTimestampNano(x interface{}) TimestampNano
MustTimestampNano returns generic.TimestampNano converting of request data
func (TimestampNano) MarshalJSON ¶
func (v TimestampNano) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*TimestampNano) Scan ¶
func (v *TimestampNano) Scan(x interface{}) (err error)
Scan implements the sql.Scanner interface.
func (*TimestampNano) Set ¶
func (v *TimestampNano) Set(x interface{}) (err error)
Set sets a specified value.
func (TimestampNano) String ¶
func (v TimestampNano) String() string
String implements the Stringer interface.
func (*TimestampNano) UnmarshalJSON ¶
func (v *TimestampNano) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
func (TimestampNano) Value ¶
func (v TimestampNano) Value() (driver.Value, error)
Value returns timestamp with nanoseconds, but if TimestampNano.ValidFlag is false, returns nil.
func (TimestampNano) Weak ¶
func (v TimestampNano) Weak() interface{}
Weak returns timestamp with nano seconds, but if TimestampNano.ValidFlag is false, returns nil.
type Type ¶
type Type interface { Valid() bool Value() (driver.Value, error) Scan(interface{}) error Set(interface{}) error Reset() }
Type is the interface used as the basis for generic types
type URL ¶
type URL struct { ValidFlag // contains filtered or unexported fields }
URL is generic url.URL type structure
func MarshalURL ¶
MarshalURL return generic.URL converting of request data
func MustURL ¶
func MustURL(x interface{}) URL
MustURL return generic.URL converting of request data
func (URL) EscapedPath ¶
EscapedPath returns the escaped form of v.url.Path. In general there are multiple possible escaped forms of any path.
EscapedPath returns v.url.RawPath when it is a valid escaping of v.url.Path. Otherwise EscapedPath ignores v.url.RawPath and computes an escaped form on its own. The String and RequestURI methods use EscapedPath to construct their results. In general, code should call EscapedPath instead of reading v.url.RawPath directly.
func (URL) Hostname ¶
Hostname returns v.url.Host, without any port number.
If Host is an IPv6 literal with a port number, Hostname returns the IPv6 literal without the square brackets. IPv6 literals may include a zone identifier.
func (URL) IsAbs ¶
IsAbs reports whether the URL is absolute. Absolute means that it has a non-empty scheme.
func (URL) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (URL) Parse ¶
Parse parses a URL in the context of the receiver. The provided URL may be relative or absolute. Parse returns nil, err on parse failure, otherwise its return value is the same as ResolveReference.
func (URL) Port ¶
Port returns the port part of u.Host, without the leading colon. If u.Host doesn't contain a port, Port returns an empty string.
func (URL) Query ¶
Query parses RawQuery and returns the corresponding values. It silently discards malformed value pairs. To check errors use ParseQuery.
func (URL) RequestURI ¶
RequestURI returns the encoded path?query or opaque?query string that would be used in an HTTP request for v.
func (URL) ResolveReference ¶
ResolveReference resolves a URI reference to an absolute URI from an absolute base URI, per RFC 3986 Section 5.2. The URI reference may be relative or absolute. ResolveReference always returns a new URL instance, even if the returned URL is identical to either the base or reference. If ref is an absolute URL, then ResolveReference ignores base and returns a copy of ref.
func (*URL) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
type Uint ¶
type Uint struct { ValidFlag // contains filtered or unexported fields }
Uint is generic uint type structure
func MarshalUint ¶
MarshalUint return generic.Uint converting of request data
func MustUint ¶
func MustUint(x interface{}) Uint
MustUint return generic.Uint converting of request data
func (Uint) MarshalJSON ¶
MarshalJSON implements the json.Marshaler interface.
func (*Uint) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.