Documentation
¶
Overview ¶
Package secretfile resolves values from files mounted as Docker secrets.
The *_FILE env var convention is the pattern used by Postgres, MySQL, Redis, and other Docker Official Images to source sensitive values from files (typically /run/secrets/*) rather than inline env vars — keeping them out of process environments and `docker inspect` output.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OverrideDSNPassword ¶
OverrideDSNPassword returns dsn with its password component replaced by the contents of the file at pwFile. When pwFile is empty, dsn is returned unchanged. The password is URL-encoded by url.UserPassword, so callers may store raw special characters in the secret file.
Returns an error if dsn is not a URL-style DSN or has no user component.
Types ¶
This section is empty.