mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Add action type *dynamic_action_plan
This commit is contained in:
committed by
Dan Christian Bogos
parent
ccdf3ef1f1
commit
33a47f663c
@@ -367,8 +367,14 @@ func (t *TPTiming) IsActiveAt(tm time.Time) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
// Returns true if string can be split in 3 sperated by ":" signs. "00:00:00"
|
||||
// Returns true if string can be split in 3 sperated by ":" signs. "00:00:00", or if
|
||||
// its parsable to a duration
|
||||
func IsTimeFormated(t string) bool {
|
||||
if strings.HasPrefix(t, PlusChar) {
|
||||
if _, err := time.ParseDuration(strings.TrimPrefix(t, PlusChar)); err != nil {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return len(strings.Split(t, ":")) == 3
|
||||
}
|
||||
|
||||
|
||||
@@ -199,6 +199,7 @@ const (
|
||||
FilterValStart = "("
|
||||
FilterValEnd = ")"
|
||||
PlusChar = "+"
|
||||
MinusChar = "-"
|
||||
JSON = "json"
|
||||
JSONCaps = "JSON"
|
||||
GOBCaps = "GOB"
|
||||
@@ -1183,6 +1184,7 @@ const (
|
||||
MetaDynamicThreshold = "*dynamic_threshold"
|
||||
MetaDynamicStats = "*dynamic_stats"
|
||||
MetaDynamicAttribute = "*dynamic_attribute"
|
||||
MetaDynamicActionPlan = "*dynamic_action_plan"
|
||||
ActionID = "ActionID"
|
||||
ActionType = "ActionType"
|
||||
ActionValue = "ActionValue"
|
||||
|
||||
Reference in New Issue
Block a user