package
0.0.0-20250307203412-7e5349ef2bba
Repository: https://github.com/mongodb/mongo-tools.git
Documentation: pkg.go.dev
# Functions
ColumnNames maps a ColumnSpec slice to their associated names.
New constructs a new MongoImport instance from the provided options.
NewCSVInputReader returns a CSVInputReader configured to read data from the given io.Reader, extracting only the specified columns using exactly "numDecoders" goroutines.
No description provided by the author
NewFieldParser yields a FieldParser corresponding to the given columnType.
NewJSONInputReader creates a new JSONInputReader in array mode if specified, configured to read data to the given io.Reader.
NewTSVInputReader returns a TSVInputReader configured to read input from the given io.Reader, extracting the specified columns only.
ParseAutoHeaders converts a list of header items to ColumnSpec objects, with automatic parsers.
ParseOptions reads command line arguments and converts them into options used to configure mongoimport.
ParsePG interprets the user-provided parseGrace, assuming it is valid.
ParseTypedHeader produces a ColumnSpec from a header item, extracting type information from it.
ParseTypedHeaders performs ParseTypedHeader on each item, returning an error if any single one fails.
ValidatePG ensures the user-provided parseGrace is one of the allowed values.
# Variables
ErrNoClosingBracket means that the input source did not contain any closing brace - returned only if --jsonArray is passed in.
ErrNoOpeningBracket means that the input source did not contain any opening brace - returned only if --jsonArray is passed in.
No description provided by the author
No description provided by the author
# Structs
ColumnSpec keeps information for each 'column' of import.
CSVConverter implements the Converter interface for CSV input.
CSVInputReader implements the InputReader interface for CSV input types.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
IngestOptions defines the set of options for storing data.
InputOptions defines the set of options for reading input data.
JSONConverter implements the Converter interface for JSON input.
JSONInputReader is an implementation of InputReader that reads documents in JSON format.
MongoImport is a container for the user-specified options and internal state used for running mongoimport.
Options contains all the possible options that can be used to configure mongoimport.
TSVConverter implements the Converter interface for TSV input.
TSVInputReader is a struct that implements the InputReader interface for a TSV input source.
# Interfaces
Converter is an interface that adds the basic Convert method which returns a valid BSON document that has been converted by the underlying implementation.
FieldParser is the interface for any parser of a field item.
No description provided by the author
# Type aliases
No description provided by the author