mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-16 05:39:54 +05:00
using tasks and action plans with no accounts
This commit is contained in:
@@ -169,6 +169,7 @@ const (
|
||||
ASR = "ASR"
|
||||
ACD = "ACD"
|
||||
FILTER_REGEXP_TPL = "$1$2$3$4$5"
|
||||
TASKS_KEY = "tasks"
|
||||
ACTION_PLAN_PREFIX = "apl_"
|
||||
ACTION_TRIGGER_PREFIX = "atr_"
|
||||
RATING_PLAN_PREFIX = "rpl_"
|
||||
|
||||
17
utils/map.go
17
utils/map.go
@@ -143,3 +143,20 @@ func (sm StringMap) GetOne() string {
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func NoDots(m map[string]struct{}) map[string]struct{} {
|
||||
return MapKeysReplace(m, ".", ".")
|
||||
}
|
||||
|
||||
func YesDots(m map[string]struct{}) map[string]struct{} {
|
||||
return MapKeysReplace(m, ".", ".")
|
||||
}
|
||||
|
||||
func MapKeysReplace(m map[string]struct{}, old, new string) map[string]struct{} {
|
||||
for key, val := range m {
|
||||
delete(m, key)
|
||||
key = strings.Replace(key, old, new, -1)
|
||||
m[key] = val
|
||||
}
|
||||
return m
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user