pub fn get_redis_url(config: DatabaseConfig) -> (String, String)
Expand description
Parses a Redis connection URL from the given database config, returning the full URL and a redacted version with the password obfuscated.
Authentication matrix handled: ┌───────────┬───────────┬────────────────────────────┐ │ Username │ Password │ Resulting user-info part │ ├───────────┼───────────┼────────────────────────────┤ │ non-empty │ non-empty │ user:pass@ │ │ empty │ non-empty │ :pass@ │ │ empty │ empty │ (omitted) │ └───────────┴───────────┴────────────────────────────┘
§Panics
Panics if a username is provided without a corresponding password.