mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Add stordb pgSSLCertMode option
This commit is contained in:
committed by
Dan Christian Bogos
parent
9a79b092a5
commit
73fc386036
@@ -29,7 +29,7 @@ import (
|
||||
|
||||
// NewPostgresStorage returns the posgres storDB
|
||||
func NewPostgresStorage(host, port, name, user, password, pgSchema,
|
||||
sslmode, sslcert, sslkey, sslpassword, sslrootcert string,
|
||||
sslmode, sslcert, sslkey, sslpassword, sslcertmode, sslrootcert string,
|
||||
maxConn, maxIdleConn int, connMaxLifetime time.Duration) (*SQLStorage, error) {
|
||||
connStr := fmt.Sprintf(
|
||||
"host=%s port=%s dbname=%s user=%s password=%s sslmode=%s",
|
||||
@@ -43,6 +43,9 @@ func NewPostgresStorage(host, port, name, user, password, pgSchema,
|
||||
if sslpassword != "" {
|
||||
connStr = connStr + " sslpassword=" + sslpassword
|
||||
}
|
||||
if sslcertmode != "" {
|
||||
connStr = connStr + " sslcertmode=" + sslcertmode
|
||||
}
|
||||
if sslrootcert != "" {
|
||||
connStr = connStr + " sslrootcert=" + sslrootcert
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user