Documentation
¶
Overview ¶
Package exporter provides a unified interface for exporting tabular data using pluggable codecs (e.g., CSV, JSON, HTML). It wraps a data source and a codec implementation to perform the export.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter is the main struct that coordinates exporting data. It uses a scanner.Rows as the data source and a codec.Codec to determine the output format.
Directories
¶
Path | Synopsis |
---|---|
Package codec defines the Codec interface and provides factory functions to create different output format encoders such as CSV, JSON, and HTML.
|
Package codec defines the Codec interface and provides factory functions to create different output format encoders such as CSV, JSON, and HTML. |
csv
Package csvcodec provides an implementation of the Codec interface for writing data in CSV (Comma-Separated Values) format.
|
Package csvcodec provides an implementation of the Codec interface for writing data in CSV (Comma-Separated Values) format. |
html
Package htmlcodec provides an HTML implementation of the Codec interface, generating well-formatted HTML tables with optional headers, NULL styling, row preprocessing, and type-specific string conversion.
|
Package htmlcodec provides an HTML implementation of the Codec interface, generating well-formatted HTML tables with optional headers, NULL styling, row preprocessing, and type-specific string conversion. |
json
Package jsoncodec provides a JSON implementation of the Codec interface, allowing tabular data to be exported in either standard JSON array format or newline-delimited JSON (JSON Lines).
|
Package jsoncodec provides a JSON implementation of the Codec interface, allowing tabular data to be exported in either standard JSON array format or newline-delimited JSON (JSON Lines). |
xml
Package xmlcodec provides an XML implementation of the Codec interface, generating well-formatted XML tables with optional headers, NULL styling, row preprocessing, and type-specific string conversion.
|
Package xmlcodec provides an XML implementation of the Codec interface, generating well-formatted XML tables with optional headers, NULL styling, row preprocessing, and type-specific string conversion. |
Package scanner defines interfaces and types for column and row metadata.
|
Package scanner defines interfaces and types for column and row metadata. |
Package tostring provides functionality to convert arbitrary Go values into their string representation, while also detecting NULL or zero-equivalent values.
|
Package tostring provides functionality to convert arbitrary Go values into their string representation, while also detecting NULL or zero-equivalent values. |
Click to show internal directories.
Click to hide internal directories.