mirror of
https://github.com/gofiber/storage.git
synced 2025-10-05 08:37:10 +08:00
URL parsing for redis (#64)
* URL parsing for redis Co-authored-by: TroyDota <49777269+TroyDota@users.noreply.github.com>
This commit is contained in:
@@ -27,6 +27,12 @@ type Config struct {
|
||||
// Optional. Default is 0
|
||||
Database int
|
||||
|
||||
// URL the standard format redis url to parse all other options. If this is set all other config options, Host, Port, Username, Password, Database have no effect.
|
||||
//
|
||||
// Example: redis://<user>:<pass>@localhost:6379/<db>
|
||||
// Optional. Default is ""
|
||||
URL string
|
||||
|
||||
// Reset clears any existing keys in existing Collection
|
||||
//
|
||||
// Optional. Default is false
|
||||
@@ -45,6 +51,7 @@ var ConfigDefault = Config{
|
||||
Port: 6379,
|
||||
Username: "",
|
||||
Password: "",
|
||||
URL: "",
|
||||
Database: 0,
|
||||
Reset: false,
|
||||
}
|
||||
|
Reference in New Issue
Block a user