Versions in this module Expand all Collapse all v1 v1.4.3 Nov 17, 2021 v1.4.2 Nov 17, 2021 Changes in this version + const CSV + const JSON + const TSV + var ErrNoClosingBracket = errors.New(...) + var ErrNoOpeningBracket = errors.New(...) + var UTF8_BOM = []byte + var Usage = ... + func ColumnNames(fs []ColumnSpec) (s []string) + type CSVConverter struct + func (c CSVConverter) Convert() (b bson.D, err error) + func (c CSVConverter) Print() + type CSVInputReader struct + func NewCSVInputReader(colSpecs []ColumnSpec, in io.Reader, rejects io.Writer, numDecoders int, ...) *CSVInputReader + func (r *CSVInputReader) ReadAndValidateHeader() (err error) + func (r *CSVInputReader) ReadAndValidateTypedHeader(parseGrace ParseGrace) (err error) + func (r *CSVInputReader) StreamDocument(ordered bool, readDocs chan bson.D) (retErr error) + type ColumnSpec struct + Name string + NameParts []string + ParseGrace ParseGrace + Parser FieldParser + TypeName string + func ParseAutoHeaders(headers []string) (fs []ColumnSpec) + func ParseTypedHeader(header string, parseGrace ParseGrace) (f ColumnSpec, err error) + func ParseTypedHeaders(headers []string, parseGrace ParseGrace) (fs []ColumnSpec, err error) + type Converter interface + Convert func() (document bson.D, err error) + type FieldAutoParser struct + func (ap *FieldAutoParser) Parse(in string) (interface{}, error) + type FieldBinaryParser struct + func NewFieldBinaryParser(arg string) (*FieldBinaryParser, error) + func (bp *FieldBinaryParser) Parse(in string) (interface{}, error) + type FieldBooleanParser struct + func (bp *FieldBooleanParser) Parse(in string) (interface{}, error) + type FieldDateParser struct + func (dp *FieldDateParser) Parse(in string) (interface{}, error) + type FieldDecimalParser struct + func (ip *FieldDecimalParser) Parse(in string) (interface{}, error) + type FieldDoubleParser struct + func (dp *FieldDoubleParser) Parse(in string) (interface{}, error) + type FieldInfo struct + type FieldInt32Parser struct + func (ip *FieldInt32Parser) Parse(in string) (interface{}, error) + type FieldInt64Parser struct + func (ip *FieldInt64Parser) Parse(in string) (interface{}, error) + type FieldParser interface + Parse func(in string) (interface{}, error) + func NewFieldParser(t columnType, arg string) (parser FieldParser, err error) + type FieldStringParser struct + func (sp *FieldStringParser) Parse(in string) (interface{}, error) + type IngestOptions struct + BulkBufferSize int + BypassDocumentValidation bool + Drop bool + IgnoreBlanks bool + MaintainInsertionOrder bool + Mode string + NumDecodingWorkers int + NumInsertionWorkers int + StopOnError bool + Upsert bool + UpsertFields string + WriteConcern string + func (_ *IngestOptions) Name() string + type InputOptions struct + ColumnsHaveTypes bool + FieldFile *string + Fields *string + File string + HeaderLine bool + JSONArray bool + Legacy bool + ParseGrace string + Type string + UseArrayIndexFields bool + func (_ *InputOptions) Name() string + type InputReader interface + ReadAndValidateHeader func() error + ReadAndValidateTypedHeader func(parseGrace ParseGrace) error + StreamDocument func(ordered bool, read chan bson.D) error + type JSONConverter struct + func (c JSONConverter) Convert() (bson.D, error) + type JSONInputReader struct + func NewJSONInputReader(isArray bool, legacyExtJSON bool, in io.Reader, numDecoders int) *JSONInputReader + func (r *JSONInputReader) ReadAndValidateHeader() error + func (r *JSONInputReader) ReadAndValidateTypedHeader(parseGrace ParseGrace) error + func (r *JSONInputReader) StreamDocument(ordered bool, readChan chan bson.D) (retErr error) + type MongoImport struct + IngestOptions *IngestOptions + InputOptions *InputOptions + SessionProvider *db.SessionProvider + ToolOptions *options.ToolOptions + func New(opts Options) (*MongoImport, error) + func (imp *MongoImport) Close() + func (imp *MongoImport) ImportDocuments() (uint64, uint64, error) + type Options struct + ParsedArgs []string + func ParseOptions(rawArgs []string, versionStr, gitCommit string) (Options, error) + type ParseGrace int + func ParsePG(pg string) (res ParseGrace) + func ValidatePG(pg string) (ParseGrace, error) + type TSVConverter struct + func (c TSVConverter) Convert() (b bson.D, err error) + func (c TSVConverter) Print() + type TSVInputReader struct + func NewTSVInputReader(colSpecs []ColumnSpec, in io.Reader, rejects io.Writer, numDecoders int, ...) *TSVInputReader + func (r *TSVInputReader) ReadAndValidateHeader() (err error) + func (r *TSVInputReader) ReadAndValidateTypedHeader(parseGrace ParseGrace) (err error) + func (r *TSVInputReader) StreamDocument(ordered bool, readDocs chan bson.D) (retErr error)