Commit Graph

151 Commits

Author SHA1 Message Date
ionutboangiu
fee2712a23 chore: replace interface{} with any 2024-09-05 20:46:40 +02:00
ionutboangiu
555a143b79 Take out cdrID from SetCDR parameters 2023-12-12 10:09:18 +01:00
ionutboangiu
d29f84169c Move cdrs to its own package
Moved engine/cdr.go to utils/cdr.go.
Moved engine/cdrs.go and engine/cdrs_test.go to cdrs package.
Moved api functions from cdrs/cdrs.go to cdrs/apis.go. Same for the
tests.
Deleted CDRsV1 type and its methods.
2023-12-12 10:09:18 +01: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
ab26ba2d02 Implement RemoveCDRs for MongoStorage (untested and not optimized) 2023-12-12 10:09:18 +01:00
ionutboangiu
fb6b38850c Update mongo SetCDR method to take into account allowUpdate param 2023-12-12 10:09: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
d5039b3ce8 Add CDRs CRUD queries back and remove TP functions 2023-11-09 20:50:36 +01:00
gezimbll
04d05c3a4f replacing non-meta constants for storage types 2023-03-08 19:13:48 +01: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
917e8045a5 Removed set and get for cdrs 2022-01-12 08:44:36 +01:00
andronache
7ab4167613 Corrected header in multiple files 2021-11-01 13:50:00 +02:00
andronache
53474406e3 Started removing timing 2021-05-18 15:01:27 +02:00
andronache
c3e7337cdf Continue removing destination 2021-05-13 16:12:15 +02:00
Trial97
2da495af19 Starting adding back AttributesSv1 APIs 2021-04-13 13:35:03 +02:00
porosnicuadrian
5d8e04821a Removed profile from all accounts in all packages 2021-04-09 14:38:42 +02:00
porosnicuadrian
850a43433b Renamed AccountProfile in Accounts from all packages 2021-04-07 19:25:42 +02:00
Trial97
b028a99050 Removed rals config 2021-04-01 16:36:51 +02:00
Trial97
48205d689d Removed until build 2021-03-30 20:49:53 +02:00
Trial97
c0b66f42aa Starting removing RALs 2021-03-30 20:49:53 +02:00
Trial97
c13a5cf790 Finished implementing the DataNode as a replacement 2021-03-26 13:46:25 +01:00
Trial97
5353b95e43 Updated go version and replaced ioutil package 2021-03-18 16:46:55 +01:00
Trial97
f2c9ca3530 Fixed typo in license header 2021-03-10 16:22:37 +01:00
andronache
1d0a814e42 Changed consts in utils 2021-01-11 10:57:44 +01:00
andronache
36da1a6309 Consts in utils 2021-01-11 10:57:44 +01:00
andronache
4ff3b9242d Consts in utils 2021-01-07 18:15:35 +01:00
andronache
dbb9216b6e Modified consts in utils 2021-01-07 18:15:35 +01:00
TeoV
41d9599d87 Add infrastructure for Account in StorDB 2020-12-21 17:51:02 +01:00
porosnicuadrian
4fa97786ae Integration tests for TPRateProfile + updated RateProfile Struct + tests 2020-12-10 10:18:33 +01:00
Trial97
1c9bd9d4f2 Replaced map[string]struct{} with utils.StringSet 2020-12-04 18:44:27 +01:00
TeoV
b8f0f894a5 Add infrastructure for ActionProfile for databases 2020-12-03 20:36:21 +01:00
TeoV
21773a185d Update RateProfile to use map[string]*Rate instead of slice 2020-06-15 15:13:16 +02:00
TeoV
75406ceaf2 Add skel ( incomplete ) for RateProfiles 2020-06-11 16:49:21 +02:00
TeoV
5ebd347612 Correctly naming TBLTPRatingProfile constant 2020-06-11 16:49:21 +02:00
TeoV
944e87acd2 Rename from SupplierS to RouteS ( part2 ) 2020-04-30 15:54:49 +02:00
TeoV
fbc30d600e Use regexp.QuoteMeta to escape destination when having "+" in front of it 2020-02-06 09:58:37 +01:00
TeoV
bb0803bd96 Correctly send destination with "+" when GetCDR for mongo 2020-02-06 09:58:37 +01:00
Trial97
ffef415e8c Added cache for EventCost.FieldAsInterface 2020-02-05 18:05:53 +01:00
Trial97
9941551826 Updated apier tests 2020-01-15 16:22:47 +02:00
adragusin
076cdc48d2 Added test for duplicate key 2019-12-10 03:00:23 -05:00
adragusin
4cf69dd552 uniformed the error for duplicate key 2019-12-10 03:00:23 -05:00
TeoV
59652ed5df Complete rest of cdr filter for internalDB 2019-10-09 16:11:37 +02:00
TeoV
a575a8b497 Check error before checking deleteCount fixes #1699 2019-10-07 11:00:56 +02:00
Trial97
e923babcee Updated mongo storage 2019-07-18 02:54:19 -10:00
Trial97
ab77aaebc8 Downgraded mongo library 2019-07-17 04:59:52 -10:00
Trial97
c1f49a6e73 Updated glide.yaml 2019-07-16 22:42:42 -10:00
Tripon Alexandru-Ionut
a21e82e642 Added EnsureIndexes per migration for mongoDB 2019-05-02 21:27:15 +02:00
TeoV
f779dc5084 Take out SearchTerm from Paginator and add to a top level 2019-04-18 12:24:20 +03:00
Tripon Alexandru-Ionut
022ad003d6 Renamed DispatcherS CSV file to DispatcherProfiles.csv 2019-03-28 09:35:50 +01:00