Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DSN ¶
type DSN struct { Driver Driver User string Password string Host string // Domain or IP address without port (e.g. localhost) or path to unix domain socket directory (e.g. /private/tmp) Port uint16 Path string // Sub path after port, but before Options. It is database sometimes. Database string Options map[string]string }
func Parse ¶
Compare to gaddr.ParseURL, gdsn.Parse use professional database package to parse data source name string. Some databases have DSNs in specific formats, for example, MongoDB DSN supports multiple ports.
func ParseForSpecificDriver ¶
func (*DSN) HostAndPort ¶
Click to show internal directories.
Click to hide internal directories.