Documentation
¶
Index ¶
- func IsEiErr(err error) bool
- func NewEiErr(err string) error
- type Ei
- func (i Ei) Bool() (bool, error)
- func (i Ei) BoolZ() bool
- func (i Ei) Byte() (byte, error)
- func (i Ei) ByteZ() byte
- func (i Ei) Bytes() ([]byte, error)
- func (i Ei) BytesZ() []byte
- func (i Ei) Catch(val interface{}) Ei
- func (i Ei) Clip(min, max interface{}) Ei
- func (i Ei) F(f func(Ei, ...interface{}) Ei, p ...interface{}) Ei
- func (i Ei) Float32() (float32, error)
- func (i Ei) Float32Z() float32
- func (i Ei) Float64() (float64, error)
- func (i Ei) Float64Z() float64
- func (i Ei) HasKey(k string) (bool, error)
- func (i Ei) HasKeyZ(k string) bool
- func (i Ei) In(sl []string) Ei
- func (i Ei) Int() (int, error)
- func (i Ei) Int16() (int16, error)
- func (i Ei) Int16Z() int16
- func (i Ei) Int32() (int32, error)
- func (i Ei) Int32Z() int32
- func (i Ei) Int64() (int64, error)
- func (i Ei) Int64Z() int64
- func (i Ei) Int8() (int8, error)
- func (i Ei) Int8Z() int8
- func (i Ei) IntZ() int
- func (i Ei) Len() (int, error)
- func (i Ei) Limit(min, max interface{}) Ei
- func (i Ei) Lower() Ei
- func (i Ei) M(k string) Ei
- func (i Ei) Map(m M) Ei
- func (i Ei) MapStr() (map[string]interface{}, error)
- func (i Ei) MapStrZ() map[string]interface{}
- func (i Ei) Raw() (interface{}, error)
- func (i Ei) RawZ() interface{}
- func (i Ei) S(idx int) Ei
- func (i Ei) Slice() ([]interface{}, error)
- func (i Ei) SliceZ() []interface{}
- func (i Ei) String() (string, error)
- func (i Ei) StringZ() string
- func (i Ei) Time() (time.Time, error)
- func (i Ei) TimeZ() time.Time
- func (i Ei) Uint() (uint, error)
- func (i Ei) Uint16() (uint16, error)
- func (i Ei) Uint16Z() uint16
- func (i Ei) Uint32() (uint32, error)
- func (i Ei) Uint32Z() uint32
- func (i Ei) Uint64() (uint64, error)
- func (i Ei) Uint64Z() uint64
- func (i Ei) Uint8() (uint8, error)
- func (i Ei) Uint8Z() uint8
- func (i Ei) UintZ() uint
- func (i Ei) Upper() Ei
- type EiErr
- type M
- type S
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Ei ¶
type Ei struct {
// contains filtered or unexported fields
}
Ei (Empty Interface struct). Used to wrap interface{} and provide methods.
func N ¶
func N(i interface{}) Ei
N wraps a suppored type value (including interface{}) into Ei type.
Supported types are:
int8, int16, int32, int64, int uin8, byte, uint16, uint32, uint64, uint float32, float64 string, []byte time.Time map[string]interface{} or shorthand ei.M []interface{} or shorthand ei.S interface{} pointing to one of above types
func (Ei) Map ¶
Map replaces the input value by the map[value] entry, returns an error if value is not found.
func (Ei) RawZ ¶
func (i Ei) RawZ() interface{}
RawZ returns the content of Ei as interface{} or nil if Ei points to EiErr
func (Ei) SliceZ ¶
func (i Ei) SliceZ() []interface{}
SliceZ converts Ei to []interface{}, returns zero value on error.
type EiErr ¶
type EiErr struct {
// contains filtered or unexported fields
}
EiErr specific Ei conversion error
Click to show internal directories.
Click to hide internal directories.