MCPcopy Index your code
hub / github.com/dreamsofcode-io/zenstats / URL

Method URL

internal/config/database.go:97–107  ·  view source on GitHub ↗

URL generates a database connection url from the configuration fields.

()

Source from the content-addressed store, hash-verified

95
96// URL generates a database connection url from the configuration fields.
97func (c *Database) URL() string {
98 return fmt.Sprintf(
99 "postgresql://%s:%s@%s:%d/%s?sslmode=%s",
100 c.Username,
101 c.Password,
102 c.Host,
103 c.Port,
104 c.DBName,
105 c.SSLMode,
106 )
107}
108
109// Validate checks a Database configuration to ensure it's values are
110// valid for connecting to a database.

Callers 1

dbURLFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected