Documentation ¶
Index ¶
- Constants
- func IsNullJSON(in []byte) bool
- func IsStringJSON(in []byte) bool
- func RemoveQuotesJSON(in []byte) []byte
- type Bool
- type IntString
- func (s IntString) Int() (int, error)
- func (s IntString) IntOnly() int
- func (s IntString) MarshalJSON() (res []byte, err error)
- func (s *IntString) Scan(value interface{}) (err error)
- func (s IntString) String() string
- func (s *IntString) UnmarshalJSON(payload []byte) (err error)
- func (s IntString) Value() (res driver.Value, err error)
- type UintString
- func (s UintString) MarshalJSON() (res []byte, err error)
- func (s *UintString) Scan(value interface{}) (err error)
- func (s UintString) String() string
- func (s UintString) Uint() (uint64, error)
- func (s UintString) UintOnly() uint64
- func (s *UintString) UnmarshalJSON(payload []byte) (err error)
- func (s UintString) Value() (res driver.Value, err error)
Constants ¶
const ( DefaultBase = 10 DefaultBitSize = 64 )
List of default values used for this package.
Variables ¶
This section is empty.
Functions ¶
func IsNullJSON ¶ added in v1.2.0
func IsStringJSON ¶ added in v1.2.0
func RemoveQuotesJSON ¶ added in v1.2.0
Types ¶
type Bool ¶
type Bool bool
Bool is a custom defined type for bool.
func (Bool) MarshalJSON ¶
MarshalJSON implements the MarshalJSON interface.
func (*Bool) UnmarshalJSON ¶
UnmarshalJSON implementing UnmarshalJSON interface.
type IntString ¶ added in v1.1.0
type IntString string
IntString represents the string type that can be converted to int.
func (IntString) Int ¶ added in v1.1.0
Int returns the int value of the string and the error of parsing.
func (IntString) MarshalJSON ¶ added in v1.1.0
MarshalJSON implements the json.Marshaler interface.
func (*IntString) UnmarshalJSON ¶ added in v1.1.0
UnmarshalJSON implements the json.Unmarshaler interface.
type UintString ¶ added in v1.1.0
type UintString string
func (UintString) MarshalJSON ¶ added in v1.1.0
func (s UintString) MarshalJSON() (res []byte, err error)
MarshalJSON implements the json.Marshaler interface.
func (*UintString) Scan ¶ added in v1.1.0
func (s *UintString) Scan(value interface{}) (err error)
Scan implements the sql.Scanner interface.
func (UintString) String ¶ added in v1.1.0
func (s UintString) String() string
String implements the fmt.Stringer interface.
func (UintString) Uint ¶ added in v1.1.0
func (s UintString) Uint() (uint64, error)
Uint returns the uint value of the string and the error of parsing.
func (UintString) UintOnly ¶ added in v1.1.0
func (s UintString) UintOnly() uint64
UintOnly returns the uint value of the string.
func (*UintString) UnmarshalJSON ¶ added in v1.1.0
func (s *UintString) UnmarshalJSON(payload []byte) (err error)
UnmarshalJSON implements the json.Unmarshaler interface.