Documentation ¶
Index ¶
- Constants
- Variables
- func ConvertEnumToString(mappedValues map[int]string, valueToConvert int) string
- func ConvertInterfaceToEnum(mappedValues map[int]string, valueToConvert interface{}, enumName string) (int, error)
- func ConvertStringToEnum(mappedValues map[int]string, valueToConvert, enumName string) (int, error)
- func GenerateEnumQueryPart(mappedValues map[int]string) string
- type Decimal
- func (d Decimal) Add(dec Decimal) Decimal
- func (d Decimal) CeilToValue(dec Decimal) Decimal
- func (d Decimal) DecrementByPercent(dec Decimal) Decimal
- func (d Decimal) Div(dec Decimal) Decimal
- func (d Decimal) Equal(dec Decimal) bool
- func (d Decimal) EqualInt(input int64) bool
- func (d Decimal) EqualZero() bool
- func (d Decimal) Floor() Decimal
- func (d Decimal) FloorToValue(dec Decimal) Decimal
- func (d Decimal) Greater(dec Decimal) bool
- func (d Decimal) GreaterInt(input int64) bool
- func (d Decimal) GreaterOrEqual(dec Decimal) bool
- func (d Decimal) GreaterOrEqualInt(input int64) bool
- func (d Decimal) GreaterOrEqualZero() bool
- func (d Decimal) GreaterZero() bool
- func (d Decimal) IncrementByPercent(dec Decimal) Decimal
- func (d Decimal) Less(dec Decimal) bool
- func (d Decimal) LessOrEqual(dec Decimal) bool
- func (d Decimal) LessOrEqualZero() bool
- func (d Decimal) LessZero() bool
- func (d Decimal) LowerOrEqualInt(input int64) bool
- func (d Decimal) MarshalJSON() ([]byte, error)
- func (d Decimal) Mul(dec Decimal) Decimal
- func (d Decimal) Round(places int64) Decimal
- func (d *Decimal) Scan(value interface{}) error
- func (d Decimal) String() string
- func (d Decimal) Sub(dec Decimal) Decimal
- func (d Decimal) ToFloat() float64
- func (d Decimal) ToPercent(places int64) Decimal
- func (d *Decimal) UnmarshalJSON(decimalBytes []byte) error
- func (d Decimal) Value() (driver.Value, error)
- type FlagSet
- type KeyValueBool
- type KeyValueInt
- type KeyValueInt64
- type KeyValueInterface
- type KeyValueStr
- type NullDate
- type NullDecimal
- type NullFloat64
- type NullInt64
- type NullString
- type NullTime
- type Person
- type Salutation
- func (s Salutation) MarshalJSON() ([]byte, error)
- func (s *Salutation) Scan(value interface{}) error
- func (s *Salutation) SetFromName(uidName string) error
- func (s Salutation) String() string
- func (s *Salutation) UnmarshalJSON(jsonInput []byte) error
- func (s Salutation) Value() (driver.Value, error)
- type StringNumber
- type StringSet
- func (vs *StringSet) Add(value string)
- func (vs StringSet) Contains(needle string) bool
- func (vs *StringSet) MarshalJSON() ([]byte, error)
- func (vs *StringSet) Scan(value interface{}) error
- func (vs StringSet) String() string
- func (vs StringSet) ToStrings() (result []string)
- func (vs *StringSet) UnmarshalJSON(jsonInput []byte) error
- func (vs StringSet) Value() (driver.Value, error)
Constants ¶
View Source
const EmptyStr = `""`
View Source
const NullableStr = "null"
Variables ¶
View Source
var SalutationMap map[int]string
View Source
var ZERO = NewDecimalFromInt(0)
Functions ¶
func ConvertEnumToString ¶
func ConvertInterfaceToEnum ¶
func ConvertStringToEnum ¶
func GenerateEnumQueryPart ¶
Types ¶
type Decimal ¶
type Decimal struct {
// contains filtered or unexported fields
}
func NewDecimalFromFloat ¶
func NewDecimalFromInt ¶
func NewDecimalFromString ¶
func (Decimal) CeilToValue ¶
func (Decimal) DecrementByPercent ¶
func (Decimal) FloorToValue ¶
func (Decimal) GreaterInt ¶
func (Decimal) GreaterOrEqual ¶
func (Decimal) GreaterOrEqualInt ¶
func (Decimal) GreaterOrEqualZero ¶
func (Decimal) GreaterZero ¶
func (Decimal) IncrementByPercent ¶
func (Decimal) LessOrEqual ¶
func (Decimal) LessOrEqualZero ¶
func (Decimal) LowerOrEqualInt ¶
func (Decimal) MarshalJSON ¶
func (*Decimal) UnmarshalJSON ¶
type FlagSet ¶
FlagSet holds the info about certain keys to appear in tests
func (FlagSet) AllTrue ¶
AllTrue useful for assertions if all expected values appeared e.g. in a stream
func (FlagSet) GetNotMatchedKeys ¶
GetNotMatchedKeys useful for giving failure texts
type KeyValueBool ¶
KeyValueBool just handy implementation for map[string]bool
type KeyValueInt ¶
KeyValueInt just handy implementation for map[string]int
type KeyValueInt64 ¶
KeyValueInt64 just handy implementation for map[string]int64
type KeyValueInterface ¶
type KeyValueInterface struct { Key string Value interface{} }
KeyValueInterface just handy implementation for map[string]interface{} as []KeyValueInterface
type KeyValueStr ¶
KeyValueStr just handy implementation for map[string]string
type NullDate ¶
type NullDate struct {
NullTime
}
func (NullDate) MarshalJSON ¶
func (*NullDate) UnmarshalJSON ¶
type NullDecimal ¶
func (NullDecimal) MarshalJSON ¶
func (nd NullDecimal) MarshalJSON() ([]byte, error)
func (*NullDecimal) Scan ¶
func (nd *NullDecimal) Scan(value interface{}) (err error)
func (*NullDecimal) UnmarshalJSON ¶
func (nd *NullDecimal) UnmarshalJSON(input []byte) error
type NullFloat64 ¶
type NullFloat64 struct {
sql.NullFloat64
}
func (NullFloat64) MarshalJSON ¶
func (nf NullFloat64) MarshalJSON() ([]byte, error)
func (*NullFloat64) UnmarshalJSON ¶
func (nf *NullFloat64) UnmarshalJSON(input []byte) error
type NullString ¶
type NullString struct {
sql.NullString
}
func (NullString) MarshalJSON ¶
func (ns NullString) MarshalJSON() ([]byte, error)
func (*NullString) UnmarshalJSON ¶
func (ns *NullString) UnmarshalJSON(input []byte) error
type Person ¶
type Person struct { Salutation Salutation `json:"salutation"` Name string `json:"name"` }
type Salutation ¶
type Salutation int
const ( MS Salutation = iota MRS DR MR )
func (Salutation) MarshalJSON ¶
func (s Salutation) MarshalJSON() ([]byte, error)
func (*Salutation) Scan ¶
func (s *Salutation) Scan(value interface{}) error
func (*Salutation) SetFromName ¶
func (s *Salutation) SetFromName(uidName string) error
func (Salutation) String ¶
func (s Salutation) String() string
func (*Salutation) UnmarshalJSON ¶
func (s *Salutation) UnmarshalJSON(jsonInput []byte) error
type StringNumber ¶
type StringNumber struct {
// contains filtered or unexported fields
}
func (StringNumber) MarshalJSON ¶
func (sn StringNumber) MarshalJSON() ([]byte, error)
func (StringNumber) String ¶
func (sn StringNumber) String() string
func (*StringNumber) UnmarshalJSON ¶
func (sn *StringNumber) UnmarshalJSON(input []byte) error
type StringSet ¶
type StringSet []string
func (*StringSet) MarshalJSON ¶
func (*StringSet) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.