yao/importer/from/source.go
2022-01-17 22:51:56 +08:00

42 lines
664 B
Go

package from
const (
// TUnknown 未知
TUnknown byte = iota
// TBool bool
TBool
// TDatetime 日期时间
TDatetime
// TError 错误
TError
// TNumber 数字
TNumber
// TString 字符串
TString
)
// Source 导入文件接口
type Source interface {
Data(row int, size int, cols []int) [][]interface{}
Columns() []Column
Chunk(size int, cols []int, cb func(line int, data [][]interface{}))
Inspect() Inspect
Close() error
}
// Column 源数据列
type Column struct {
Name string
Type byte
Col int
Row int
Axis string
}
// Inspect 基础信息
type Inspect struct {
SheetName string
SheetIndex int
ColStart int
RowStart int
}