Documentation
¶
Index ¶
- func CBORSchema(resource *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
- func CSVSchema(resource *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
- func ExtensionDataFormat(path string) (format dataset.DataFormat, err error)
- func FromFile(path string) (st *dataset.Structure, err error)
- func FromReader(format dataset.DataFormat, data io.Reader) (st *dataset.Structure, n int, err error)
- func JSONSchema(resource *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
- func Schema(r *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
- func XLSXSchema(r *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CBORSchema ¶
func CBORSchema(resource *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
CBORSchema determines the field names and types of an io.Reader of CBOR-formatted data, returning a json schema
func CSVSchema ¶
func CSVSchema(resource *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
CSVSchema determines the field names and types of an io.Reader of CSV-formatted data, returning a json schema
func ExtensionDataFormat ¶
func ExtensionDataFormat(path string) (format dataset.DataFormat, err error)
ExtensionDataFormat returns the corresponding DataFormat for a given file extension if one exists TODO - this should probably come from the dataset package
func FromFile ¶
FromFile takes a filepath & tries to work out the corresponding dataset for the sake of speed, it only works with files that have a recognized extension
func FromReader ¶
func FromReader(format dataset.DataFormat, data io.Reader) (st *dataset.Structure, n int, err error)
FromReader detects a dataset structure from a reader and data format, returning a detected dataset structure, the number of bytes read from the reader, and any error
func JSONSchema ¶
func JSONSchema(resource *dataset.Structure, data io.Reader) (schema map[string]interface{}, n int, err error)
JSONSchema determines the field names and types of an io.Reader of JSON-formatted data, returning a json schema This is currently a suuuuuuuuper simple interpretation that spits out a generic schema that'll work. In the future we can do all sorts of stuff here to make better inferences about the shape of a dataset, but for now, this'll work, and we'll instead focus on making it easier for users to provide hand-built schemas
Types ¶
This section is empty.