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 RawType
- type Row
- type Streamer
- type Template
- type Value
- func CloneValue(v Value) Value
- func NewValue(v interface{}, f Format, rawtype RawType) 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 RawType) 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 {
Value
Has(key string) bool
Get(key string) (interface{}, bool)
GetAtIndex(index int) (interface{}, bool)
Set(key string, val interface{})
SetAtIndex(index int, val interface{})
Len() int
Iter() func() (string, interface{}, bool)
ImportAtKey(key string, val interface{}) error
ImportAtIndex(index int, val interface{}) error
GetValue(key string) (Value, bool)
GetValueAtIndex(index int) (Value, bool)
SetValue(key string, val Value) Row
SetValueAtIndex(index int, val Value) Row
IterValues() func() (string, Value, bool)
}
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 RawType) Template
WithMappedNumeric(name string, rawtype RawType) Template
WithMappedBoolean(name string, rawtype RawType) Template
WithMappedBinary(name string, rawtype RawType) Template
WithMappedDateTime(name string, rawtype RawType) Template
WithMappedTimestamp(name string, rawtype RawType) Template
WithMappedAuto(name string, rawtype RawType) Template
With(name string, format Format, rawtype RawType) 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() RawType
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.