Skip to content

Commit d57344d

Browse files
authored
Merge pull request #547 from cybertec-postgresql/546-add-envvar-pgtt_sslmode
[+] add `$PGTT_PGSSLMODE` environment variable support, closes #546
2 parents dce4aea + aa75883 commit d57344d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Command line options
6666
-d, --dbname= PostgreSQL database name (default: timetable) [$PGTT_PGDATABASE]
6767
-u, --user= PostgreSQL user (default: scheduler) [$PGTT_PGUSER]
6868
--password= PostgreSQL user password [$PGTT_PGPASSWORD]
69-
--sslmode=[disable|require] What SSL priority use for connection (default: disable)
69+
--sslmode=[disable|require] What SSL mode to use for connection (default: disable) [$PGTT_PGSSLMODE]
7070
--pgurl= PostgreSQL connection URL [$PGTT_URL]
7171
--timeout= PostgreSQL connection timeout in seconds (default: 90) [$PGTT_TIMEOUT]
7272

internal/config/cmdparser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ type ConnectionOpts struct {
1414
DBName string `short:"d" long:"dbname" description:"PostgreSQL database name" default:"timetable" env:"PGTT_PGDATABASE"`
1515
User string `short:"u" long:"user" description:"PostgreSQL user" default:"scheduler" env:"PGTT_PGUSER"`
1616
Password string `long:"password" description:"PostgreSQL user password" env:"PGTT_PGPASSWORD"`
17-
SSLMode string `long:"sslmode" default:"disable" description:"What SSL priority use for connection" choice:"disable" choice:"require"`
17+
SSLMode string `long:"sslmode" default:"disable" description:"What SSL mode to use for connection" env:"PGTT_PGSSLMODE" choice:"disable" choice:"require"`
1818
PgURL string `long:"pgurl" description:"PostgreSQL connection URL" env:"PGTT_URL"`
1919
Timeout int `long:"timeout" description:"PostgreSQL connection timeout" env:"PGTT_TIMEOUT" default:"90"`
2020
}

0 commit comments

Comments
 (0)