Commit Graph

487 Commits

Author SHA1 Message Date
armirveliaj
7db65ca62c Clean up DispatcherS 2025-01-17 17:29:46 +01:00
gezimbll
bb0116c543 added it test && loaders templates for ranking and trend profiles 2024-11-22 20:29:27 +01:00
gezimbll
132a2b3bf9 rankings,trends: added implementation,services and tests 2024-11-04 19:03:21 +01:00
gezimblliku
0f81b78321 updated trend profile && trends service implementation 2024-09-23 11:48:04 +02:00
ionutboangiu
0063ef3822 Add support for mongodb+srv conn format
Option can be found in db opts under the name 'mongoConnScheme'.
2024-09-05 20:46:40 +02:00
gezimblliku
73a7590f1c added profiles,configs and services for trend && ranking 2024-08-02 09:37:52 +02:00
ionutboangiu
1cec3751e4 Update SetCDR signature to include the cdrID
Updated mongo indexing for cdrs to take into consideration only the
opts.*cdrID field.

Fixed cdrs_it_test.go test.

Before storing CDRs in CDR processEvents, we are now temporarily generating
the *cdrID in APIOpts (until we decide where this should happen).
2023-12-12 10:09:18 +01:00
ionutboangiu
f0852b645b Rename composeURI func to composeMongoURI
To reflect that it's used exclusively for MongoDB (for now at least).

Also added a descriptive comment to the function.
2023-12-07 16:56:08 +01:00
ionutboangiu
8909786a4b Revise buildURL function
Renamed to composeURI.

Use simple string concatenation to build URI because there is
no need to keep the Parse call as a validation step. Any issue
would be caught when establishing a connection.
2023-12-07 16:56:08 +01:00
ionutboangiu
26cdb571b8 Upgrade MongoDB driver to 1.13
- Set (but comment) serverAPI options (currently distinct api and
create.size BSON field are deprecated + possible others that are untested)
- Remove the custom time decoder used for mongo BSON
datetime values. The custom decoder was only converting these values
into UTC and was not any different from the default time.Time
decoder in the MongoDB driver, which also handles BSON string, int64,
and document values.
- Implement 'buildURL' function to connect to mongo (can also be
used for mysql and postgres)
- Update function names, variable names, and comments for clarity
- Replace 'bsonx.Regex' with the Regex primitive (deprecated since 1.12).
- Use simple concatenation instead of Sprintf
- Declare 'decimalType' locally, replace global 'decimalType'
- Simplify several functions without altering functionality
- Converting directly from a D to an M is deprecated. We are now decoding
  directly in a M.
- Used errors.As and errors.Is for proper error comparison and assertion
- Revised sloppy reassignments and added missing error checks
2023-11-14 18:24:21 +01:00
ionutboangiu
d5039b3ce8 Add CDRs CRUD queries back and remove TP functions 2023-11-09 20:50:36 +01:00
gezimbll
c6571492fc Make go vet pass 2023-10-26 15:59:34 +02:00
ionutboangiu
113e2a2bdf Replace interface{} with any 2023-05-31 10:22:28 +02:00
ionutboangiu
df1dc5e838 Add StorDB service
Add StorDB to config and services.

Put back the store_cdrs option under cdrs and update the CDRs
service to depend on StorDB.

Define the StorDB interface and add a constructor for it.

Add a constructor for postgres storage.

Add a config sanity check to validate SSL modes for postgres.

Update cgr-engine to consider StorDB on startup.
2023-05-03 10:05:28 +02:00
adi
e0418bb576 Updated mongo library 2022-11-18 11:46:25 +01:00
adi
ad7bd111d1 Improved dispatcher errors 2022-10-21 10:14:19 +02:00
adi
5b5a9f9b2f Dispatcher reviwed and it test fixes 2022-10-10 18:20:56 +02:00
porosnicuadrian
28619db53d Updated SetRateProfile + drivers and tests 2022-04-01 20:13:27 +02:00
andronache98
ecdf5e54ea Changed headers 2022-03-09 14:14:30 +01:00
andronache98
9ec56f5155 Changed headers 2022-03-09 14:14:30 +01:00
andronache98
928dbd9e42 Removing StorDB 2022-03-09 14:14:30 +01:00
ionutboangiu
5d2089979c Remove tenant from arguments for config storage functions 2022-03-02 16:02:15 +02:00
ionutboangiu
b2f11e7f42 Implement config drv funcs for redis, mongo and internal dbs 2022-03-02 12:06:33 +02:00
ionutboangiu
eb22903fd4 Add get,set,remove functions for config sections using redis + tests 2022-03-02 12:06:33 +02:00
porosnicuadrian
104a06d24b Added support at mongo dirver for count/list rates 2022-02-17 21:11:55 +02:00
porosnicuadrian
ff5f69cd15 Update code for rates apis/drivers 2022-02-08 19:10:14 +01:00
porosnicuadrian
e4e7282939 Added list/count rates for mongo driver 2022-02-08 19:10:14 +01:00
porosnicuadrian
2bcd034c02 Added copunt/list rates for internal driver 2022-02-07 20:04:53 +01:00
porosnicuadrian
e3a96628ba Added GetRateProfileRateIDs apis + redis implementation 2022-02-07 20:04:53 +01:00
andronache98
ca839daa29 Changed CGRID to *originID and removed it in most places 2022-02-06 09:52:26 +01:00
porosnicuadrian
2c953ef513 Finished CRUD tests for rates 2022-02-06 09:49:37 +01:00
porosnicuadrian
782155312f Updated RemoveRateProfile for rates 2022-02-03 16:11:16 +01:00
porosnicuadrian
e748667165 Updated rates set/get/remove for mongo 2022-02-03 16:11:16 +01:00
porosnicuadrian
ae4e92ded4 Moved marshaler and added to map ratePrf 2022-02-03 16:11:16 +01:00
porosnicuadrian
e84b89186c Updated redis itnerface for rates 2022-02-03 16:11:16 +01:00
porosnicuadrian
17ba57f7b1 Improved getFIelds for GetKeysForPrefix mongo 2022-01-26 18:28:55 +01:00
Trial97
46f0ddb860 Added decimal context config 2021-12-15 19:57:25 +01:00
Trial97
b1c80fe8cb Updated mongodb config handling 2021-09-20 10:45:14 +02:00
porosnicuadrian
717d372fac Added transaction for filter indexes(case of computeIDs) + little update on mongo/redis get/set index 2021-08-24 20:19:53 +02:00
Trial97
3664d0794a Updated guardian 2021-07-16 17:04:54 +02:00
Trial97
34e093f98e Added all dispatcherS APIs 2021-06-17 15:41:41 +02:00
porosnicuadrian
183bddb416 Added back chargers apis + context 2021-06-11 12:34:51 +02:00
Trial97
421c193f6a Removed unused RemoveKeysForPrefix 2021-06-08 12:04:47 +02:00
Trial97
32dfcc0a46 Updated config set 2021-05-28 12:44:30 +03:00
porosnicuadrian
788919bdaa Added context for routes methods 2021-05-26 20:05:26 +02:00
ionutboangiu
c8d69b882a Fix errors after adding the context parameters 2021-05-25 20:16:56 +02:00
ionutboangiu
0462d16143 Add resources APIs and fill in context where needed 2021-05-25 20:16:56 +02:00
Trial97
0a75016833 Updated filter indexing 2021-05-19 15:54:14 +02:00
andronache
7671c0cb5e Started removing timing 2021-05-18 15:01:27 +02:00
andronache
53474406e3 Started removing timing 2021-05-18 15:01:27 +02:00