Versions in this module Expand all Collapse all v1 v1.0.5 Apr 8, 2024 v1.0.3 Apr 8, 2024 Changes in this version + const IncompatibleArgsErrorFormat + var BuiltWithGSSAPI = true + var BuiltWithSSL = true + var ConnectionOptFunctions []OptionRegistrationFunction + func ConflictingArgsErrorFormat(optionName, uriValue, cliValue, cliOptionName string) error + func EnableFailpoints(opts *ToolOptions) + func LogSensitiveOptionWarnings(args []string) + type Auth struct + AWSSessionToken string + Mechanism string + Password string + Source string + Username string + func (auth *Auth) IsSet() bool + func (auth *Auth) RequiresExternalDB() bool + func (auth *Auth) ShouldAskForPassword() bool + type Connection struct + Compressors string + Host string + Port string + ServerSelectionTimeout int + SocketTimeout int + TCPKeepAliveSeconds int + Timeout int + type DestinationAuthOptions interface + SetDestinationPassword func(string) + type EnabledOptions struct + Auth bool + Connection bool + Namespace bool + URI bool + type ExtraOptions interface + Name func() string + type General struct + ConfigPath string + Failpoints string + Help bool + MaxProcs int + Trace bool + Version bool + type Kerberos struct + Service string + ServiceHost string + type Namespace struct + Collection string + DB string + func (ns Namespace) String() string + type OptionRegistrationFunction func(*ToolOptions) error + type SSL struct + SSLAllowInvalidCert bool + SSLAllowInvalidHost bool + SSLCAFile string + SSLCRLFile string + SSLFipsMode bool + SSLPEMKeyFile string + SSLPEMKeyPassword string + TLSInsecure bool + UseSSL bool + func (ssl *SSL) ShouldAskForPassword() (bool, error) + type ToolOptions struct + AppName string + Direct bool + GitCommit string + ReadPreference *readpref.ReadPref + ReplicaSetName string + RetryWrites *bool + VersionStr string + WriteConcern *writeconcern.WriteConcern + func New(appName, versionStr, gitCommit, usageStr string, parsePositionalArgsAsURI bool, ...) *ToolOptions + func (opts *ToolOptions) AddOptions(extraOpts ExtraOptions) + func (opts *ToolOptions) AddToExtraOptionsRegistry(extraOpts ExtraOptions) + func (opts *ToolOptions) CallArgParser(args []string) ([]string, error) + func (opts *ToolOptions) EnabledToolOptions() EnabledOptions + func (opts *ToolOptions) FindOptionByLongName(name string) *flags.Option + func (opts *ToolOptions) GetAuthenticationDatabase() string + func (opts *ToolOptions) NormalizeOptionsAndURI() error + func (opts *ToolOptions) ParseArgs(args []string) ([]string, error) + func (opts *ToolOptions) ParseConfigFile(args []string) error + func (opts *ToolOptions) PrintHelp(force bool) bool + func (opts *ToolOptions) PrintVersion() bool + func (opts *ToolOptions) UseReadOnlyHostDescription() + type URI struct + ConnString connstring.ConnString + ConnectionString string + func NewURI(unparsed string) (*URI, error) + func (uri *URI) GetConnectionAddrs() []string + func (uri *URI) LogUnsupportedOptions() + func (uri *URI) ParsedConnString() *connstring.ConnString + type URISetter interface + SetOptionsFromURI func(connstring.ConnString) error + type Verbosity struct + Quiet bool + SetVerbosity func(string) + VLevel int + VerbosityParsed bool + func (v Verbosity) IsQuiet() bool + func (v Verbosity) Level() int + type WriteConcern struct + WriteConcern string