mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-23 12:30:41 +01:00
docs(config): add method docs
This commit is contained in:
parent
80be12d0d5
commit
b18fb8dced
@ -677,6 +677,16 @@ func (d *DbConfig) GetHostname() string {
|
||||
return d.Hostname
|
||||
}
|
||||
|
||||
// GetConnectionString constructs the database connection string based on the current configuration.
|
||||
// It supports MySQL, BoltDB, and PostgreSQL dialects.
|
||||
// If the dialect is unsupported, it returns an error.
|
||||
//
|
||||
// Parameters:
|
||||
// - includeDbName: a boolean indicating whether to include the database name in the connection string.
|
||||
//
|
||||
// Returns:
|
||||
// - connectionString: the constructed database connection string.
|
||||
// - err: an error if the dialect is unsupported.
|
||||
func (d *DbConfig) GetConnectionString(includeDbName bool) (connectionString string, err error) {
|
||||
dbName := d.GetDbName()
|
||||
dbUser := d.GetUsername()
|
||||
|
Loading…
Reference in New Issue
Block a user