mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Rename in ERs from *json to *file_json to be consistent
This commit is contained in:
committed by
Dan Christian Bogos
parent
3e69d5ddb7
commit
05143d62d1
@@ -341,7 +341,7 @@ var posibleLoaderTypes = utils.NewStringSet([]string{utils.MetaAttributes,
|
||||
|
||||
var possibleReaderTypes = utils.NewStringSet([]string{utils.MetaFileCSV,
|
||||
utils.MetaKafkajsonMap, utils.MetaFileXML, utils.MetaSQL, utils.MetaFileFWV,
|
||||
utils.MetaPartialCSV, utils.MetaFlatstore, utils.MetaJSON, utils.META_NONE})
|
||||
utils.MetaPartialCSV, utils.MetaFlatstore, utils.MetaFileJSON, utils.META_NONE})
|
||||
|
||||
var possibleExporterTypes = utils.NewStringSet([]string{utils.MetaFileCSV, utils.META_NONE, utils.MetaFileFWV,
|
||||
utils.MetaHTTPPost, utils.MetaHTTPjsonMap, utils.MetaAMQPjsonMap, utils.MetaAMQPV1jsonMap, utils.MetaSQSjsonMap,
|
||||
|
||||
@@ -552,7 +552,7 @@ func (cfg *CGRConfig) checkConfigSanity() error {
|
||||
if rdr.RunDelay > 0 {
|
||||
return fmt.Errorf("<%s> the RunDelay field can not be bigger than zero for reader with ID: %s", utils.ERs, rdr.ID)
|
||||
}
|
||||
case utils.MetaFileXML, utils.MetaFileFWV, utils.MetaJSON:
|
||||
case utils.MetaFileXML, utils.MetaFileFWV, utils.MetaFileJSON:
|
||||
for _, dir := range []string{rdr.ProcessedPath, rdr.SourcePath} {
|
||||
if _, err := os.Stat(dir); err != nil && os.IsNotExist(err) {
|
||||
return fmt.Errorf("<%s> nonexistent folder: %s for reader with ID: %s", utils.ERs, dir, rdr.ID)
|
||||
|
||||
@@ -354,7 +354,7 @@
|
||||
{
|
||||
"id": "JSONReader",
|
||||
"run_delay": "-1",
|
||||
"type": "*json",
|
||||
"type": "*file_json",
|
||||
"source_path": "/tmp/ErsJSON/in",
|
||||
"flags": ["*cdrs"],
|
||||
"processed_path": "/tmp/ErsJSON/out",
|
||||
|
||||
@@ -355,7 +355,7 @@
|
||||
{
|
||||
"id": "JSONReader",
|
||||
"run_delay": "-1",
|
||||
"type": "*json",
|
||||
"type": "*file_json",
|
||||
"source_path": "/tmp/ErsJSON/in",
|
||||
"flags": ["*cdrs"],
|
||||
"processed_path": "/tmp/ErsJSON/out",
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
{
|
||||
"id": "JSONReader",
|
||||
"run_delay": "-1",
|
||||
"type": "*json",
|
||||
"type": "*file_json",
|
||||
"source_path": "/tmp/ErsJSON/in",
|
||||
"flags": ["*cdrs"],
|
||||
"processed_path": "/tmp/ErsJSON/out",
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
{
|
||||
"id": "JSONReader",
|
||||
"run_delay": "-1",
|
||||
"type": "*json",
|
||||
"type": "*file_json",
|
||||
"source_path": "/tmp/ErsJSON/in",
|
||||
"flags": ["*cdrs"],
|
||||
"processed_path": "/tmp/ErsJSON/out",
|
||||
|
||||
@@ -53,7 +53,7 @@ func NewEventReader(cfg *config.CGRConfig, cfgIdx int,
|
||||
return NewSQLEventReader(cfg, cfgIdx, rdrEvents, rdrErr, fltrS, rdrExit)
|
||||
case utils.MetaFlatstore:
|
||||
return NewFlatstoreER(cfg, cfgIdx, rdrEvents, rdrErr, fltrS, rdrExit)
|
||||
case utils.MetaJSON:
|
||||
case utils.MetaFileJSON:
|
||||
return NewJSONFileER(cfg, cfgIdx, rdrEvents, rdrErr, fltrS, rdrExit)
|
||||
case utils.MetaAMQPjsonMap:
|
||||
return NewAMQPER(cfg, cfgIdx, rdrEvents, rdrErr, fltrS, rdrExit)
|
||||
|
||||
@@ -346,6 +346,7 @@ const (
|
||||
ZERO_RATING_SUBJECT_PREFIX = "*zero"
|
||||
OK = "OK"
|
||||
MetaFileXML = "*file_xml"
|
||||
MetaFileJSON = "*file_json"
|
||||
MASK_CHAR = "*"
|
||||
CONCATENATED_KEY_SEP = ":"
|
||||
UNIT_TEST = "UNIT_TEST"
|
||||
|
||||
Reference in New Issue
Block a user