Documentation
¶
Index ¶
- func GetFormatterForFormat(format ExportFormat, options map[string]interface{}) (interface{}, error)
- type CSVFormatter
- type ConsoleProgressReporter
- type ExportData
- type ExportFormat
- type ExportMetadata
- type ExportOptions
- type Exporter
- type JSONFormatter
- type MarkdownFormatter
- type ProgressReporter
- type SQLFormatter
- type SilentProgressReporter
- type TemplateFormatter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFormatterForFormat ¶
func GetFormatterForFormat(format ExportFormat, options map[string]interface{}) (interface{}, error)
GetFormatterForFormat returns the appropriate formatter for the given format
Types ¶
type CSVFormatter ¶
CSVFormatter handles CSV export formatting
func (*CSVFormatter) FormatCSV ¶
func (f *CSVFormatter) FormatCSV(data *ExportData, writer io.Writer) error
FormatCSV exports executions in CSV format
type ConsoleProgressReporter ¶
type ConsoleProgressReporter struct {
// contains filtered or unexported fields
}
ConsoleProgressReporter implements progress reporting to console
func (*ConsoleProgressReporter) Finish ¶
func (p *ConsoleProgressReporter) Finish(success bool, message string)
Finish completes progress reporting
func (*ConsoleProgressReporter) Start ¶
func (p *ConsoleProgressReporter) Start(total int)
Start begins progress reporting
func (*ConsoleProgressReporter) Update ¶
func (p *ConsoleProgressReporter) Update(current int, message string)
Update reports progress
type ExportData ¶
type ExportData struct {
Metadata ExportMetadata `json:"metadata"`
Executions []logging.WafflesExecution `json:"executions"`
Files map[string][]logging.WafflesFile `json:"files,omitempty"`
Steps map[string][]logging.WafflesStep `json:"steps,omitempty"`
Statistics *logging.ExecutionStats `json:"statistics,omitempty"`
}
ExportData represents the complete export data structure
type ExportFormat ¶
type ExportFormat string
ExportFormat represents different export formats
const ( FormatJSON ExportFormat = "json" FormatCSV ExportFormat = "csv" FormatMarkdown ExportFormat = "markdown" FormatSQL ExportFormat = "sql" FormatTemplate ExportFormat = "template" )
type ExportMetadata ¶
type ExportMetadata struct {
ExportedAt time.Time `json:"exported_at"`
Format ExportFormat `json:"format"`
RecordCount int `json:"record_count"`
FilterApplied bool `json:"filter_applied"`
Version string `json:"version"`
}
ExportMetadata contains information about the export
type ExportOptions ¶
type ExportOptions struct {
Format ExportFormat `json:"format"`
Filter *logging.ExecutionFilter `json:"filter,omitempty"`
IncludeFiles bool `json:"include_files"`
IncludeSteps bool `json:"include_steps"`
IncludeStats bool `json:"include_stats"`
Compress bool `json:"compress"`
Template string `json:"template,omitempty"`
TemplateData map[string]interface{} `json:"template_data,omitempty"`
}
ExportOptions contains options for exporting data
type Exporter ¶
type Exporter struct {
// contains filtered or unexported fields
}
Exporter handles the export process with progress indication and streaming
func NewExporter ¶
func NewExporter(queryEngine *query.QueryEngine, options *ExportOptions) *Exporter
NewExporter creates a new exporter
func (*Exporter) ExportToFile ¶
ExportToFile exports data directly to a file
func (*Exporter) SetProgressReporter ¶
func (e *Exporter) SetProgressReporter(reporter ProgressReporter)
SetProgressReporter sets a custom progress reporter
type JSONFormatter ¶
type JSONFormatter struct {
Pretty bool
}
JSONFormatter handles JSON export formatting
func (*JSONFormatter) FormatJSON ¶
func (f *JSONFormatter) FormatJSON(data *ExportData, writer io.Writer) error
FormatJSON exports data in JSON format
type MarkdownFormatter ¶
MarkdownFormatter handles Markdown export formatting
func (*MarkdownFormatter) FormatMarkdown ¶
func (f *MarkdownFormatter) FormatMarkdown(data *ExportData, writer io.Writer) error
FormatMarkdown exports data in Markdown format
type ProgressReporter ¶
type ProgressReporter interface {
Start(total int)
Update(current int, message string)
Finish(success bool, message string)
}
ProgressReporter interface for progress reporting during exports
type SQLFormatter ¶
SQLFormatter handles SQL export formatting
func (*SQLFormatter) FormatSQL ¶
func (f *SQLFormatter) FormatSQL(data *ExportData, writer io.Writer) error
FormatSQL exports data as SQL INSERT statements
type SilentProgressReporter ¶
type SilentProgressReporter struct{}
SilentProgressReporter implements silent progress reporting
func (*SilentProgressReporter) Finish ¶
func (p *SilentProgressReporter) Finish(success bool, message string)
func (*SilentProgressReporter) Start ¶
func (p *SilentProgressReporter) Start(total int)
func (*SilentProgressReporter) Update ¶
func (p *SilentProgressReporter) Update(current int, message string)
type TemplateFormatter ¶
TemplateFormatter handles custom template formatting
func (*TemplateFormatter) FormatTemplate ¶
func (f *TemplateFormatter) FormatTemplate(data *ExportData, writer io.Writer) error
FormatTemplate exports data using a custom Go template