mongodb

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMongoDBURL

func IsMongoDBURL(str string) bool

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL