@rivascva/dt-idl 1.1.181 → 1.1.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -43,18 +43,22 @@ type BaseRDB struct {
43
43
  verboseLog log.Logger
44
44
  }
45
45
 
46
- func NewBaseRDB(address string, username string, password string, service string) RDB {
46
+ func NewBaseRDB(url string, service string) (RDB, error) {
47
+ // parse the connection url
48
+ opts, err := goredis.ParseURL(url)
49
+ if err != nil {
50
+ return nil, fmt.Errorf("failed to parse the url: %w", err)
51
+ }
52
+
53
+ // create the redis client
54
+ client := goredis.NewClient(opts)
55
+
47
56
  //exhaustruct:ignore - other fields are optional
48
- client := goredis.NewClient(&goredis.Options{
49
- Addr: address,
50
- Username: username,
51
- Password: password,
52
- })
53
57
  return &BaseRDB{
54
58
  client: client,
55
59
  database: service,
56
60
  verboseLog: nil,
57
- }
61
+ }, nil
58
62
  }
59
63
 
60
64
  func (r *BaseRDB) NewRDB(database string) RDB {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivascva/dt-idl",
3
- "version": "1.1.181",
3
+ "version": "1.1.182",
4
4
  "description": "Dream Trade - Interface Definition Language",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",