Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDatabaseURL ¶
IsDatabaseURL checks if a string is a database URL
func NewDBHandler ¶
func NewDBHandler(connInfo ConnectionInfo, bar *progressbar.ProgressBar, storage storage.Storage, limitLines int, collection string) filehandler.FileHandler
NewDBHandler creates a new database file handler
Types ¶
type ConnectionInfo ¶
type ConnectionInfo struct {
Type dbconnector.DBType
Host string
Port int
User string
Password string
Database string
Table string
SSLMode string
}
ConnectionInfo holds parsed connection information
func ParseDatabaseURL ¶
func ParseDatabaseURL(urlStr string) (*ConnectionInfo, error)
ParseDatabaseURL parses a database URL and returns connection info Format: postgres://user:password@host:port/database/table
mysql://user:password@host:port/database/table
Click to show internal directories.
Click to hide internal directories.