Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsMongoDBURL ¶
IsMongoDBURL checks if a string is a MongoDB URL
func NewMongoHandler ¶
func NewMongoHandler(connInfo ConnectionInfo, bar *progressbar.ProgressBar, storage storage.Storage, limitLines int, collection string) filehandler.FileHandler
NewMongoHandler creates a new MongoDB file handler
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct {
Host string
Port int
User string
Password string
Database string
Collection string
Options string
}
ConnectionInfo holds parsed MongoDB connection information
func ParseMongoDBURL ¶
func ParseMongoDBURL(urlStr string) (*ConnectionInfo, error)
ParseMongoDBURL parses a MongoDB URL and returns connection info Format: mongodb://user:password@host:port/database/collection
mongodb+srv://user:password@host/database/collection
Click to show internal directories.
Click to hide internal directories.