Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Header ¶
type Header struct {
ParserSettings ParserSettings `json:"parser_settings,omitempty"`
}
Header contains the common ParserSettings for all schemas.
type ParserSettings ¶
type ParserSettings struct { Version string `json:"version,omitempty"` FileFormatType string `json:"file_format_type,omitempty"` Encoding *string `json:"encoding,omitempty"` }
ParserSettings defines the common header (and its JSON format) for all schemas across all schema handlers. It contains vital information about which handler a schema wants to use, and what file format the input stream is of (e.g. fixed-length txt, CSV/TSV, XML, JSON, EDI, etc). Also optionally, it specifies the expected the encoding scheme for the input streams this schema is used for.
func (ParserSettings) WrapEncoding ¶
func (p ParserSettings) WrapEncoding(input io.Reader) io.Reader
WrapEncoding returns an io.Reader that ensures the encoding scheme matches what's specified in 'parser_settings.encoding' setting.
Click to show internal directories.
Click to hide internal directories.