Commit Graph

5442 Commits

Author SHA1 Message Date
ionutboangiu
f5d69cb41b Implement ProcessStoredEvents API 2023-11-16 15:38:18 +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
e5ab21def5 Implement AdminSv1 Get/RemoveCDRs APIs for CDRs
Addition of storDB to AdminSv1 was required.
2023-11-09 20:50:36 +01:00
ionutboangiu
d5039b3ce8 Add CDRs CRUD queries back and remove TP functions 2023-11-09 20:50:36 +01:00
ionutboangiu
d7679e2e9a Add negative filters to filter type string sets 2023-11-09 20:50:36 +01:00
gezimbll
32ed816de7 Replacing IsSliceMember ,CloneStringSlice and SliceStringEqual with slices package functions 2023-11-01 21:38:27 +01:00
ionutboangiu
65310e7437 Move benchmark relying on redis to it_test file 2023-10-27 18:52:05 +02:00
gezimbll
c6571492fc Make go vet pass 2023-10-26 15:59:34 +02:00
ionutboangiu
4c34d321de Add sanity check to prevent xml reader panic
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).

If isAbsolute is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. Alternatively, if isAbsolute is false, it
will just return . to signal that the path currently
being processed is the one required.This avoids a nil
expr error coming from the xmlquery library.

Use the Query and QueryAll functions from the xmlquery
package to be able to handle the errors ourselves and
avoid panics.

Remove config default value for xmlRootPath. The field
will remain commented in config_defaults for reference.

Add tests for HierarchyPath.AsString function.

Add comments for XmlProvider and xmlRootPath opt.

Update XmlProvider String() func based on the comment
which specifies that it should display the already
parsed values out of cache.
2023-10-19 17:19:30 +02:00
ionutboangiu
efcb32741a Run gofmt 2023-09-28 20:48:39 +02:00
NikolasPetriti
61a781675c Fix comment in models 2023-08-29 17:00:14 +02:00
NikolasPetriti
039b4269e8 Add tests for msgpack encoding/decoding for all basic go types that we are using in 1.0 2023-08-29 17:00:14 +02:00
NikolasPetriti
512f0a7c2d Revise struct tags for tp models 2023-08-29 17:00:14 +02:00
arberkatellari
770454c007 Renew DlgList, DNSAgent & add SRV/A support 2023-08-28 12:27:53 +02:00
gezimbll
5b5a159706 Added sentrypeer filter type 2023-08-02 16:49:33 +02:00
arberkatellari
d501e3d34a Add coverage tests in engine 2023-05-31 17:03:50 +02:00
arberkatellari
4cc5fa8a01 Add coverage tests for engine 2023-05-31 17:03:50 +02:00
arberkatellari
245a27acb1 Add coverage tests for engine 2023-05-31 17:03:50 +02:00
ionutboangiu
113e2a2bdf Replace interface{} with any 2023-05-31 10:22:28 +02:00
arberkatellari
61fa86126f Add coverage tests for engine 2023-05-25 08:51:59 +02:00
arberkatellari
23d026a7f9 Add coverage tests for engine 2023-05-23 08:22:14 +02:00
arberkatellari
6d167af009 Add coverage tests for engine 2023-05-18 19:29:02 +02:00
arberkatellari
ad6f3be8cb Add coverage tests for engine 2023-05-18 19:29:02 +02:00
arberkatellari
cfc8bc3dfd Add coverage tests for engine 2023-05-18 19:29:02 +02:00
arberkatellari
060961c6c0 Add coverage tests for engine 2023-05-18 19:29:02 +02:00
arberkatellari
59aad8dea4 Add coverage tests to engine 2023-05-18 19:29:02 +02:00
arberkatellari
9b5f594402 Add coverage tests for engine 2023-05-10 10:40:29 +02:00
arberkatellari
29e66e0390 Add coverage tests for engine 2023-05-10 10:40:29 +02:00
arberkatellari
f57a659b7b Add coverage tests for engine 2023-05-07 19:26:16 +02:00
arberkatellari
44690a658d Add coverage tests for engine 2023-05-07 19:26:16 +02:00
arberkatellari
5561ac6f9e Add coverage tests for engine 2023-05-07 19:26:16 +02:00
ionutboangiu
5227b4d447 Solve compilation errors in tests after CDRs service update 2023-05-03 10:05: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
arberkatellari
0cd4ee5ca8 Add coverage tests for engine 2023-05-03 10:04:08 +02:00
arberkatellari
f0a2695350 Add coverage tests for engine 2023-05-03 10:04:08 +02:00
arberkatellari
d54e3959de Add coverage tests for engine 2023-05-03 10:04:08 +02:00
arberkatellari
6f604d4319 Add coverage tests for engine 2023-05-03 10:04:08 +02:00
arberkatellari
b4e991f8d1 Add coverage tests for engine 2023-05-03 10:04:08 +02:00
arberkatellari
f206b8904b Add coverage tests for engine 2023-05-03 10:04:08 +02:00
arberkatellari
34762ecce8 Add coverage tests for engine 2023-04-20 20:07:00 +02:00
arberkatellari
ab7b115c14 Add coverage tests for engine 2023-04-20 20:07:00 +02:00
arberkatellari
c3ec2bb909 Add coverage tests for engine 2023-04-18 20:33:57 +02:00
arberkatellari
763d6c7134 Add coverage tests for engine 2023-04-17 11:23:11 +02:00
arberkatellari
98799d35f7 add coverage tests for engine 2023-04-17 11:23:11 +02:00
arberkatellari
ce18067cd1 Add Coverage tests for engine 2023-04-17 11:23:11 +02:00
arberkatellari
b353010b57 Add coverage tests for engine 2023-04-17 11:23:11 +02:00
arberkatellari
4d0211bb94 Add Coverage tests for engine 2023-03-28 18:00:12 +02:00
arberkatellari
6f5a294daf Add coverage tests in engine 2023-03-28 18:00:12 +02:00
arberkatellari
decf62cfab Add Coverage tests for engine 2023-03-28 18:00:12 +02:00
arberkatellari
801ad87531 Add coverage tests for engine 2023-03-28 18:00:12 +02:00