Documentation ¶
Index ¶
- Variables
- type BoolParser
- type DecimalParser
- type ElemNotMatch
- type Float32Parser
- type Int32Parser
- type Int64Parser
- type ParsedBool
- type ParsedDecimal
- type ParsedDefault
- func (p ParsedDefault) Bool() bool
- func (ParsedDefault) F32() float32
- func (ParsedDefault) F64() float64
- func (ParsedDefault) I32() int32
- func (ParsedDefault) I64() int64
- func (ParsedDefault) Ifc() interface{}
- func (p ParsedDefault) IsValid() bool
- func (ParsedDefault) String() string
- func (ParsedDefault) Time() time.Time
- type ParsedFloat32
- func (ParsedFloat32) Bool() bool
- func (p ParsedFloat32) F32() float32
- func (ParsedFloat32) F64() float64
- func (ParsedFloat32) I32() int32
- func (ParsedFloat32) I64() int64
- func (ParsedFloat32) Ifc() interface{}
- func (ParsedFloat32) IsValid() bool
- func (ParsedFloat32) String() string
- func (ParsedFloat32) Time() time.Time
- type ParsedFloat64
- func (ParsedFloat64) Bool() bool
- func (ParsedFloat64) F32() float32
- func (p ParsedFloat64) F64() float64
- func (ParsedFloat64) I32() int32
- func (ParsedFloat64) I64() int64
- func (ParsedFloat64) Ifc() interface{}
- func (ParsedFloat64) IsValid() bool
- func (ParsedFloat64) String() string
- func (ParsedFloat64) Time() time.Time
- type ParsedInt32
- func (ParsedInt32) Bool() bool
- func (ParsedInt32) F32() float32
- func (ParsedInt32) F64() float64
- func (p ParsedInt32) I32() int32
- func (ParsedInt32) I64() int64
- func (ParsedInt32) Ifc() interface{}
- func (ParsedInt32) IsValid() bool
- func (ParsedInt32) String() string
- func (ParsedInt32) Time() time.Time
- type ParsedInt64
- func (ParsedInt64) Bool() bool
- func (ParsedInt64) F32() float32
- func (ParsedInt64) F64() float64
- func (ParsedInt64) I32() int32
- func (p ParsedInt64) I64() int64
- func (ParsedInt64) Ifc() interface{}
- func (ParsedInt64) IsValid() bool
- func (ParsedInt64) String() string
- func (ParsedInt64) Time() time.Time
- type ParsedString
- func (ParsedString) Bool() bool
- func (ParsedString) F32() float32
- func (ParsedString) F64() float64
- func (ParsedString) I32() int32
- func (ParsedString) I64() int64
- func (ParsedString) Ifc() interface{}
- func (ParsedString) IsValid() bool
- func (p ParsedString) String() string
- func (ParsedString) Time() time.Time
- type ParsedTime
- type ParsedValue
- type Parser
- type RowParser
- type SkipParser
- type StringParser
- type TimeParser
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCannotParse = errors.New("cannot parse")
View Source
var ErrNumberOfElemNotMatch = fmt.Errorf("number of elements does NOT match number of parser")
Functions ¶
This section is empty.
Types ¶
type BoolParser ¶
type BoolParser struct {
Name string
}
func (BoolParser) Defaults ¶
func (BoolParser) Defaults() []ParsedValue
func (BoolParser) Parse ¶
func (p BoolParser) Parse(val string) ([]ParsedValue, error)
type DecimalParser ¶
type DecimalParser struct { Name string // contains filtered or unexported fields }
func (DecimalParser) Defaults ¶
func (DecimalParser) Defaults() []ParsedValue
func (DecimalParser) Parse ¶
func (d DecimalParser) Parse(val string) ([]ParsedValue, error)
type ElemNotMatch ¶
type ElemNotMatch struct {
Want, Got int
}
func (ElemNotMatch) Error ¶
func (e ElemNotMatch) Error() string
type Float32Parser ¶
func (Float32Parser) Defaults ¶
func (Float32Parser) Defaults() []ParsedValue
func (Float32Parser) Parse ¶
func (p Float32Parser) Parse(val string) ([]ParsedValue, error)
type Int32Parser ¶
type Int32Parser struct { Name string Optional bool // if "" then nil Default int32 // as defautl value }
func (Int32Parser) Defaults ¶
func (p Int32Parser) Defaults() []ParsedValue
func (Int32Parser) Parse ¶
func (p Int32Parser) Parse(val string) ([]ParsedValue, error)
type Int64Parser ¶
type Int64Parser struct {
Name string
}
func (Int64Parser) Defaults ¶
func (Int64Parser) Defaults() []ParsedValue
func (Int64Parser) Parse ¶
func (p Int64Parser) Parse(val string) ([]ParsedValue, error)
type ParsedBool ¶
func (ParsedBool) Bool ¶
func (p ParsedBool) Bool() bool
func (ParsedBool) F32 ¶
func (ParsedBool) F32() float32
func (ParsedBool) F64 ¶
func (ParsedBool) F64() float64
func (ParsedBool) I32 ¶
func (ParsedBool) I32() int32
func (ParsedBool) I64 ¶
func (ParsedBool) I64() int64
func (ParsedBool) Ifc ¶
func (ParsedBool) Ifc() interface{}
func (ParsedBool) IsValid ¶
func (p ParsedBool) IsValid() bool
func (ParsedBool) String ¶
func (ParsedBool) String() string
func (ParsedBool) Time ¶
func (ParsedBool) Time() time.Time
type ParsedDecimal ¶
type ParsedDecimal struct { ParsedDefault // contains filtered or unexported fields }
func (ParsedDecimal) Ifc ¶
func (p ParsedDecimal) Ifc() interface{}
func (ParsedDecimal) IsValid ¶
func (p ParsedDecimal) IsValid() bool
type ParsedDefault ¶
type ParsedDefault struct{}
func (ParsedDefault) Bool ¶
func (p ParsedDefault) Bool() bool
func (ParsedDefault) F32 ¶
func (ParsedDefault) F32() float32
func (ParsedDefault) F64 ¶
func (ParsedDefault) F64() float64
func (ParsedDefault) I32 ¶
func (ParsedDefault) I32() int32
func (ParsedDefault) I64 ¶
func (ParsedDefault) I64() int64
func (ParsedDefault) Ifc ¶
func (ParsedDefault) Ifc() interface{}
func (ParsedDefault) IsValid ¶
func (p ParsedDefault) IsValid() bool
func (ParsedDefault) String ¶
func (ParsedDefault) String() string
func (ParsedDefault) Time ¶
func (ParsedDefault) Time() time.Time
type ParsedFloat32 ¶
type ParsedFloat32 float32
func (ParsedFloat32) Bool ¶
func (ParsedFloat32) Bool() bool
func (ParsedFloat32) F32 ¶
func (p ParsedFloat32) F32() float32
func (ParsedFloat32) F64 ¶
func (ParsedFloat32) F64() float64
func (ParsedFloat32) I32 ¶
func (ParsedFloat32) I32() int32
func (ParsedFloat32) I64 ¶
func (ParsedFloat32) I64() int64
func (ParsedFloat32) Ifc ¶
func (ParsedFloat32) Ifc() interface{}
func (ParsedFloat32) IsValid ¶
func (ParsedFloat32) IsValid() bool
func (ParsedFloat32) String ¶
func (ParsedFloat32) String() string
func (ParsedFloat32) Time ¶
func (ParsedFloat32) Time() time.Time
type ParsedFloat64 ¶
type ParsedFloat64 float64
func (ParsedFloat64) Bool ¶
func (ParsedFloat64) Bool() bool
func (ParsedFloat64) F32 ¶
func (ParsedFloat64) F32() float32
func (ParsedFloat64) F64 ¶
func (p ParsedFloat64) F64() float64
func (ParsedFloat64) I32 ¶
func (ParsedFloat64) I32() int32
func (ParsedFloat64) I64 ¶
func (ParsedFloat64) I64() int64
func (ParsedFloat64) Ifc ¶
func (ParsedFloat64) Ifc() interface{}
func (ParsedFloat64) IsValid ¶
func (ParsedFloat64) IsValid() bool
func (ParsedFloat64) String ¶
func (ParsedFloat64) String() string
func (ParsedFloat64) Time ¶
func (ParsedFloat64) Time() time.Time
type ParsedInt32 ¶
type ParsedInt32 int32
func (ParsedInt32) Bool ¶
func (ParsedInt32) Bool() bool
func (ParsedInt32) F32 ¶
func (ParsedInt32) F32() float32
func (ParsedInt32) F64 ¶
func (ParsedInt32) F64() float64
func (ParsedInt32) I32 ¶
func (p ParsedInt32) I32() int32
func (ParsedInt32) I64 ¶
func (ParsedInt32) I64() int64
func (ParsedInt32) Ifc ¶
func (ParsedInt32) Ifc() interface{}
func (ParsedInt32) IsValid ¶
func (ParsedInt32) IsValid() bool
func (ParsedInt32) String ¶
func (ParsedInt32) String() string
func (ParsedInt32) Time ¶
func (ParsedInt32) Time() time.Time
type ParsedInt64 ¶
type ParsedInt64 int64
func (ParsedInt64) Bool ¶
func (ParsedInt64) Bool() bool
func (ParsedInt64) F32 ¶
func (ParsedInt64) F32() float32
func (ParsedInt64) F64 ¶
func (ParsedInt64) F64() float64
func (ParsedInt64) I32 ¶
func (ParsedInt64) I32() int32
func (ParsedInt64) I64 ¶
func (p ParsedInt64) I64() int64
func (ParsedInt64) Ifc ¶
func (ParsedInt64) Ifc() interface{}
func (ParsedInt64) IsValid ¶
func (ParsedInt64) IsValid() bool
func (ParsedInt64) String ¶
func (ParsedInt64) String() string
func (ParsedInt64) Time ¶
func (ParsedInt64) Time() time.Time
type ParsedString ¶
type ParsedString string
func (ParsedString) Bool ¶
func (ParsedString) Bool() bool
func (ParsedString) F32 ¶
func (ParsedString) F32() float32
func (ParsedString) F64 ¶
func (ParsedString) F64() float64
func (ParsedString) I32 ¶
func (ParsedString) I32() int32
func (ParsedString) I64 ¶
func (ParsedString) I64() int64
func (ParsedString) Ifc ¶
func (ParsedString) Ifc() interface{}
func (ParsedString) IsValid ¶
func (ParsedString) IsValid() bool
func (ParsedString) String ¶
func (p ParsedString) String() string
func (ParsedString) Time ¶
func (ParsedString) Time() time.Time
type ParsedTime ¶
func (ParsedTime) Bool ¶
func (ParsedTime) Bool() bool
func (ParsedTime) F32 ¶
func (ParsedTime) F32() float32
func (ParsedTime) F64 ¶
func (ParsedTime) F64() float64
func (ParsedTime) I32 ¶
func (ParsedTime) I32() int32
func (ParsedTime) I64 ¶
func (ParsedTime) I64() int64
func (ParsedTime) Ifc ¶
func (ParsedTime) Ifc() interface{}
func (ParsedTime) IsValid ¶
func (ParsedTime) IsValid() bool
func (ParsedTime) String ¶
func (ParsedTime) String() string
func (ParsedTime) Time ¶
func (p ParsedTime) Time() time.Time
type ParsedValue ¶
type Parser ¶
type Parser interface { Parse(val string) ([]ParsedValue, error) Defaults() []ParsedValue }
type SkipParser ¶
type SkipParser struct {
Name string
}
Skips parsing one value.
func (SkipParser) Defaults ¶
func (SkipParser) Defaults() []ParsedValue
func (SkipParser) Parse ¶
func (SkipParser) Parse(val string) ([]ParsedValue, error)
type StringParser ¶
type StringParser struct {
Name string
}
func (StringParser) Defaults ¶
func (StringParser) Defaults() []ParsedValue
func (StringParser) Parse ¶
func (StringParser) Parse(val string) ([]ParsedValue, error)
type TimeParser ¶
func (TimeParser) Defaults ¶
func (TimeParser) Defaults() []ParsedValue
func (TimeParser) Parse ¶
func (t TimeParser) Parse(val string) ([]ParsedValue, error)
Click to show internal directories.
Click to hide internal directories.