Documentation
¶
Overview ¶
Package csv provides CSV format adapters for the Pulse I/O pipeline.
Package csv provides CSV import and export for the pulse I/O pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads CSV data from a byte source.
func NewReaderFromBytes ¶
NewReaderFromBytes creates a CSV reader from raw bytes.
func (*Reader) ReadHeader ¶
ReadHeader returns the column names from the first row.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer writes CSV data to a buffer.
func NewWriterToBuffer ¶
func NewWriterToBuffer() *Writer
NewWriterToBuffer creates a CSV writer that writes to an internal buffer.
func (*Writer) OverlayWarnings ¶ added in v0.19.0
func (w *Writer) OverlayWarnings() []*errors.CodedError
OverlayWarnings returns the PULSE_OVERLAY_EXPORT_CSV_UNSUPPORTED warning slice for the recorded overlay layers, or nil when no layers were recorded. The dispatcher wiring (E9-S11) consumes this slice and lifts it onto the ExportReport / envelope warnings slot.
Per research/export-embedding-shape.md § 7.1 the warning fires REGARDLESS of ExportJob.IncludeOverlays because the writer never sees the IncludeOverlays toggle directly — the dispatcher chooses whether to call SetOverlays at all based on IncludeOverlays. When IncludeOverlays resolves to false (explicit opt-out) the dispatcher skips SetOverlays entirely and OverlayWarnings() stays empty; when IncludeOverlays resolves to true (default or explicit) and the Response carries layers, SetOverlays gets the slice and OverlayWarnings() emits the warning.
nil or empty recorded layers produce an empty warning slice — the warning is specifically "you asked for overlays but CSV cannot carry them," not "CSV cannot carry overlays in general."
func (*Writer) SetOverlays ¶ added in v0.19.0
func (w *Writer) SetOverlays(layers []*types.OverlayLayer)
SetOverlays records the Response.Overlays layers the export pipeline wanted the writer to embed. CSV cannot encode overlay payloads so the layers are RECORDED for the warn-and-skip emission surface but NEVER written into the CSV body. The host CSV output is byte- identical to a pre-overlay export regardless of whether SetOverlays was called or what slice it received. Implements pio.OverlayAwareWriter — the dispatcher (E9-S11) lifts the OverlayWarnings() slice onto the ExportReport / envelope warnings slot.
Calling SetOverlays multiple times overwrites the previously recorded layers; the warning slice surfaces the LAST recorded set.
func (*Writer) WriteHeader ¶
WriteHeader writes the column names as the first CSV row.