Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVStorage ¶
type CSVStorage struct {
// contains filtered or unexported fields
}
CSVStorage writes items as CSV rows.
func NewCSVStorage ¶
func NewCSVStorage(outputPath string, logger *slog.Logger) (*CSVStorage, error)
NewCSVStorage creates a new CSV file storage.
func (*CSVStorage) Close ¶
func (s *CSVStorage) Close() error
func (*CSVStorage) Name ¶
func (s *CSVStorage) Name() string
type JSONLStorage ¶
type JSONLStorage struct {
// contains filtered or unexported fields
}
JSONLStorage writes items as newline-delimited JSON (one object per line).
func NewJSONLStorage ¶
func NewJSONLStorage(outputPath string, logger *slog.Logger) (*JSONLStorage, error)
NewJSONLStorage creates a new JSONL file storage (streaming writes).
func (*JSONLStorage) Close ¶
func (s *JSONLStorage) Close() error
func (*JSONLStorage) Name ¶
func (s *JSONLStorage) Name() string
type JSONStorage ¶
type JSONStorage struct {
// contains filtered or unexported fields
}
JSONStorage writes items as a JSON array to a file.
func NewJSONStorage ¶
func NewJSONStorage(outputPath string, logger *slog.Logger) (*JSONStorage, error)
NewJSONStorage creates a new JSON file storage.
func (*JSONStorage) Close ¶
func (s *JSONStorage) Close() error
func (*JSONStorage) Name ¶
func (s *JSONStorage) Name() string
type MongoStorage ¶
type MongoStorage struct {
// contains filtered or unexported fields
}
MongoStorage writes items to a MongoDB collection.
func NewMongoStorage ¶
func NewMongoStorage(uri, database, collection string, logger *slog.Logger) (*MongoStorage, error)
NewMongoStorage creates a new MongoDB storage backend.
func (*MongoStorage) Close ¶
func (s *MongoStorage) Close() error
func (*MongoStorage) Name ¶
func (s *MongoStorage) Name() string
type MultiStorage ¶
type MultiStorage struct {
// contains filtered or unexported fields
}
MultiStorage writes items to multiple backends simultaneously.
func NewMultiStorage ¶
func NewMultiStorage(backends []Storage, logger *slog.Logger) *MultiStorage
NewMultiStorage creates a storage that fans out to multiple backends.
func (*MultiStorage) Close ¶
func (s *MultiStorage) Close() error
func (*MultiStorage) Name ¶
func (s *MultiStorage) Name() string
Click to show internal directories.
Click to hide internal directories.