header

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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). Optionally, it specifies the expected 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL