Documentation ¶
Index ¶
Constants ¶
View Source
const ( SchemePostgreSQL = "postgres" SSLModeAllow = "allow" SSLModeDisable = "disable" SSLModePrefer = "prefer" SSLModeRequire = "require" SSLModeVerifyCA = "verify-ca" SSLModeVerifyFull = "verify-full" )
Variables ¶
This section is empty.
Functions ¶
func SSLModeParse ¶
func SSLModeParseOrDefault ¶
Types ¶
type DataSource ¶
type DataSource struct { Scheme string Host string Port uint Addr string `json:"Addr,omitempty"` User string `json:"User,omitempty"` Password string `json:"Password,omitempty"` Database string `json:"Database,omitempty"` SSLMode string `json:"sslmode,omitempty"` }
func (*DataSource) DSN ¶
func (ds *DataSource) DSN() (string, error)
func (*DataSource) HostOrDefault ¶
func (ds *DataSource) HostOrDefault() string
func (*DataSource) Hostname ¶
func (ds *DataSource) Hostname() string
func (*DataSource) PortOrDefault ¶
func (ds *DataSource) PortOrDefault() int
func (*DataSource) Trim ¶
func (ds *DataSource) Trim()
func (*DataSource) UserPassword ¶
func (ds *DataSource) UserPassword() string
Click to show internal directories.
Click to hide internal directories.