Documentation
¶
Index ¶
- Variables
- func DefaultProcessor(r Row, e error) error
- func NoFailureProcessor(r Row, e error) error
- type Exporter
- type Format
- type Importer
- type Processor
- type Row
- type Streamer
- type Template
- type Value
- func CloneValue(v Value) Value
- func NewValue(v interface{}, f Format, rawtype interface{}) Value
- func NewValueAuto(v interface{}) Value
- func NewValueBinary(v interface{}) Value
- func NewValueBoolean(v interface{}) Value
- func NewValueDateTime(v interface{}) Value
- func NewValueHidden(v interface{}) Value
- func NewValueNil(f Format, rawtype interface{}) Value
- func NewValueNumeric(v interface{}) Value
- func NewValueString(v interface{}) Value
- func NewValueTimestamp(v interface{}) Value
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DefaultProcessor ¶
func NoFailureProcessor ¶
Types ¶
type Exporter ¶
func NewExporter ¶
type Format ¶
type Format int8
const ( String Format = iota // String representation, e.g. : "hello", "2.4", "true". Numeric // Numeric (integer or decimal), e.g. : 2.4, 1. Boolean // Boolean : true or false. Binary // Binary representation encoded as base64. DateTime // DateTime as RFC3339, e.g. : "2006-01-02T15:04:05Z", "2006-01-02T15:04:05+07:00". Timestamp // Timestamp the number of seconds since 1970 ("UNIX time"). Auto // Auto columns have no specific format enforced. Hidden // Hidden columns will not be exported in jsonline. )
type Importer ¶
func NewImporter ¶
type Row ¶
type Row interface {
Set(key string, val Value) Row
SetAtIndex(index int, val Value) Row
ImportAtKey(key string, val interface{}) error
ImportAtIndex(index int, val interface{}) error
Get(key string) Value
GetAtIndex(index int) Value
Iter() func() (string, Value, bool)
Value
}
Row of data.
type Streamer ¶
func NewStreamer ¶
type Template ¶
type Template interface {
WithString(name string) Template
WithNumeric(name string) Template
WithBoolean(name string) Template
WithBinary(name string) Template
WithDateTime(name string) Template
WithTimestamp(name string) Template
WithAuto(name string) Template
WithHidden(name string) Template
WithRow(name string, row Template) Template
WithMappedString(name string, rawtype interface{}) Template
WithMappedNumeric(name string, rawtype interface{}) Template
WithMappedBoolean(name string, rawtype interface{}) Template
WithMappedBinary(name string, rawtype interface{}) Template
WithMappedDateTime(name string, rawtype interface{}) Template
WithMappedTimestamp(name string, rawtype interface{}) Template
WithMappedAuto(name string, rawtype interface{}) Template
With(name string, format Format, rawtype interface{}) Template
CreateRow(interface{}) (Row, error)
CreateRowEmpty() Row
GetExporter(io.Writer) Exporter
GetImporter(io.Reader) Importer
}
func NewTemplate ¶
func NewTemplate() Template
type Value ¶
type Value interface {
GetFormat() Format
GetRawType() interface{}
Raw() interface{}
Export() (interface{}, error)
Import(interface{}) error
json.Unmarshaler
json.Marshaler
fmt.Stringer
DebugString() string
}
func CloneValue ¶
func NewValueAuto ¶
func NewValueAuto(v interface{}) Value
func NewValueBinary ¶
func NewValueBinary(v interface{}) Value
func NewValueBoolean ¶
func NewValueBoolean(v interface{}) Value
func NewValueDateTime ¶
func NewValueDateTime(v interface{}) Value
func NewValueHidden ¶
func NewValueHidden(v interface{}) Value
func NewValueNil ¶
func NewValueNumeric ¶
func NewValueNumeric(v interface{}) Value
func NewValueString ¶
func NewValueString(v interface{}) Value
func NewValueTimestamp ¶
func NewValueTimestamp(v interface{}) Value
Click to show internal directories.
Click to hide internal directories.