Skip to content

Commit

Permalink
Merge pull request #547 from cybertec-postgresql/546-add-envvar-pgtt_…
Browse files Browse the repository at this point in the history
…sslmode

[+] add `$PGTT_PGSSLMODE` environment variable support, closes #546
  • Loading branch information
pashagolub authored Feb 28, 2023
2 parents dce4aea + aa75883 commit d57344d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Command line options
-d, --dbname= PostgreSQL database name (default: timetable) [$PGTT_PGDATABASE]
-u, --user= PostgreSQL user (default: scheduler) [$PGTT_PGUSER]
--password= PostgreSQL user password [$PGTT_PGPASSWORD]
--sslmode=[disable|require] What SSL priority use for connection (default: disable)
--sslmode=[disable|require] What SSL mode to use for connection (default: disable) [$PGTT_PGSSLMODE]
--pgurl= PostgreSQL connection URL [$PGTT_URL]
--timeout= PostgreSQL connection timeout in seconds (default: 90) [$PGTT_TIMEOUT]
Expand Down
2 changes: 1 addition & 1 deletion internal/config/cmdparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type ConnectionOpts struct {
DBName string `short:"d" long:"dbname" description:"PostgreSQL database name" default:"timetable" env:"PGTT_PGDATABASE"`
User string `short:"u" long:"user" description:"PostgreSQL user" default:"scheduler" env:"PGTT_PGUSER"`
Password string `long:"password" description:"PostgreSQL user password" env:"PGTT_PGPASSWORD"`
SSLMode string `long:"sslmode" default:"disable" description:"What SSL priority use for connection" choice:"disable" choice:"require"`
SSLMode string `long:"sslmode" default:"disable" description:"What SSL mode to use for connection" env:"PGTT_PGSSLMODE" choice:"disable" choice:"require"`
PgURL string `long:"pgurl" description:"PostgreSQL connection URL" env:"PGTT_URL"`
Timeout int `long:"timeout" description:"PostgreSQL connection timeout" env:"PGTT_TIMEOUT" default:"90"`
}
Expand Down

0 comments on commit d57344d

Please sign in to comment.