Skip to content

Commit

Permalink
Add support for sslMode parameter with SQL (#174)
Browse files Browse the repository at this point in the history
  • Loading branch information
galt-tr authored Feb 11, 2025
1 parent e42112f commit 3b8415d
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/config/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func (c *Config) loadDatastore(ctx context.Context, models []interface{}) error
TimeZone: c.Datastore.SQLWrite.TimeZone,
TxTimeout: c.Datastore.SQLWrite.TxTimeout,
User: c.Datastore.SQLWrite.User,
SslMode: c.Datastore.SQLWrite.SslMode,
},
{ // READ REPLICA
CommonConfig: datastore.CommonConfig{
Expand All @@ -76,6 +77,7 @@ func (c *Config) loadDatastore(ctx context.Context, models []interface{}) error
TimeZone: c.Datastore.SQLRead.TimeZone,
TxTimeout: c.Datastore.SQLRead.TxTimeout,
User: c.Datastore.SQLRead.User,
SslMode: c.Datastore.SQLRead.SslMode,
},
}))

Expand Down
2 changes: 2 additions & 0 deletions app/config/envs/local.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"port": "5432",
"replica": true,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "postgres"
Expand All @@ -57,6 +58,7 @@
"port": "5432",
"replica": false,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "postgres"
Expand Down
2 changes: 2 additions & 0 deletions app/config/envs/mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"port": "5432",
"replica": true,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "your_user"
Expand All @@ -58,6 +59,7 @@
"port": "5432",
"replica": false,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "your_user"
Expand Down
2 changes: 2 additions & 0 deletions app/config/envs/production.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"port": "5432",
"replica": true,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "your_user"
Expand All @@ -56,6 +57,7 @@
"port": "5432",
"replica": false,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "your_user"
Expand Down
2 changes: 2 additions & 0 deletions app/config/envs/stn.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"port": "5432",
"replica": true,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "postgres"
Expand All @@ -58,6 +59,7 @@
"port": "5432",
"replica": false,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "postgres"
Expand Down
2 changes: 2 additions & 0 deletions app/config/envs/testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"port": "5432",
"replica": true,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "postgres"
Expand All @@ -58,6 +59,7 @@
"port": "5432",
"replica": false,
"skip_initialize_with_version": true,
"ssl_mode": "disable",
"time_zone": "UTC",
"tx_timeout": "20s",
"user": "postgres"
Expand Down

0 comments on commit 3b8415d

Please sign in to comment.