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) 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) 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) 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 ¶ added in v1.0.0
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 (Bool) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaler interface.
func (*Bool) Scan ¶ added in v1.0.0
Scan implements the sql.Scanner interface.
func (*Bool) Set ¶ added in v1.0.0
Set sets a specified value.
func (*Bool) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaler interface.
func (Bool) Value ¶ added in v1.0.0
Value implements the driver Valuer 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 ¶ added in v1.0.0
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 (Float) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaler interface.
func (*Float) Scan ¶ added in v1.0.0
Scan implements the sql.Scanner interface.
func (*Float) Set ¶ added in v1.0.0
Set sets a specified value.
func (*Float) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaler interface.
func (Float) Value ¶ added in v1.0.0
Value implements the driver Valuer interface.
type Int ¶ added in v1.0.0
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 (Int) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaler interface.
func (*Int) Scan ¶ added in v1.0.0
Scan implements the sql.Scanner interface.
func (*Int) Set ¶ added in v1.0.0
Set sets a specified value.
func (*Int) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaler interface.
func (Int) Value ¶ added in v1.0.0
Value implements the driver Valuer interface.
type String ¶ added in v1.0.0
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 (String) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaler interface.
func (*String) Scan ¶ added in v1.0.0
Scan implements the sql.Scanner interface.
func (*String) Set ¶ added in v1.0.0
Set sets a specified value.
func (String) String ¶ added in v1.0.0
String implements the Stringer interface.
func (*String) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaler interface.
func (String) Value ¶ added in v1.0.0
Value implements the driver Valuer interface.
type Time ¶ added in v1.0.0
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 (Time) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaler interface.
func (*Time) Scan ¶ added in v1.0.0
Scan implements the sql.Scanner interface.
func (*Time) Set ¶ added in v1.0.0
Set sets a specified value.
func (*Time) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaler interface.
func (Time) Value ¶ added in v1.0.0
Value implements the driver Valuer interface.
type Timestamp ¶ added in v1.1.0
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 (Timestamp) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaler interface.
func (*Timestamp) Scan ¶ added in v1.1.0
Scan implements the sql.Scanner interface.
func (*Timestamp) Set ¶ added in v1.1.0
Set sets a specified value.
func (Timestamp) String ¶
String implements the Stringer interface.
func (*Timestamp) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaler interface.
func (Timestamp) Value ¶ added in v1.1.0
Value returns Time.Time, but if Time.ValidFlag is false, returns nil.
type TimestampMS ¶ added in v1.1.0
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 return generic.TimestampMS converting of request data
func (TimestampMS) MarshalJSON ¶ added in v1.1.0
func (v TimestampMS) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*TimestampMS) Scan ¶ added in v1.1.0
func (v *TimestampMS) Scan(x interface{}) (err error)
Scan implements the sql.Scanner interface.
func (*TimestampMS) Set ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (v *TimestampMS) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
func (TimestampMS) Value ¶ added in v1.1.0
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 ¶ added in v1.1.0
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 return generic.TimestampNano converting of request data
func (TimestampNano) MarshalJSON ¶ added in v1.1.0
func (v TimestampNano) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*TimestampNano) Scan ¶ added in v1.1.0
func (v *TimestampNano) Scan(x interface{}) (err error)
Scan implements the sql.Scanner interface.
func (*TimestampNano) Set ¶ added in v1.1.0
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 ¶ added in v1.1.0
func (v *TimestampNano) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface.
func (TimestampNano) Value ¶ added in v1.1.0
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 (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) Scan ¶
Scan implements the sql.Scanner interface.
func (URL) URL ¶
URL returns *url.URL, but if String.ValidFlag is false, returns nil.
func (*URL) UnmarshalJSON ¶
UnmarshalJSON implements the json.Unmarshaler interface.
func (URL) Value ¶
Value implements the driver Valuer interface.
type Uint ¶ added in v1.0.0
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 (Uint) MarshalJSON ¶ added in v1.0.0
MarshalJSON implements the json.Marshaler interface.
func (*Uint) Scan ¶ added in v1.0.0
Scan implements the sql.Scanner interface.
func (*Uint) Set ¶ added in v1.0.0
Set sets a specified value.
func (*Uint) UnmarshalJSON ¶ added in v1.0.0
UnmarshalJSON implements the json.Unmarshaler interface.
func (Uint) Value ¶ added in v1.0.0
Value implements the driver Valuer interface.