mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 10:06:24 +05:00
Revert "Move CGREvent from utils to engine"
This reverts commit 02195c47ed.
This commit is contained in:
committed by
Dan Christian Bogos
parent
0c99cf1df5
commit
0aea8ac641
@@ -27,7 +27,7 @@ func init() {
|
||||
c := &CmdGetAttributeForEvent{
|
||||
name: "attributes_for_event",
|
||||
rpcMethod: utils.AttributeSv1GetAttributeForEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -36,7 +36,7 @@ func init() {
|
||||
type CmdGetAttributeForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func (self *CmdGetAttributeForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetAttributeForEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdAttributesProcessEvent{
|
||||
name: "attributes_process_event",
|
||||
rpcMethod: utils.AttributeSv1ProcessEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
type CmdAttributesProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (self *CmdAttributesProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdAttributesProcessEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func init() {
|
||||
c := &CmdGetChargersForEvent{
|
||||
name: "chargers_for_event",
|
||||
rpcMethod: utils.ChargerSv1GetChargersForEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -36,7 +36,7 @@ func init() {
|
||||
type CmdGetChargersForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func (self *CmdGetChargersForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetChargersForEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdChargersProcessEvent{
|
||||
name: "chargers_process_event",
|
||||
rpcMethod: utils.ChargerSv1ProcessEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
type CmdChargersProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (self *CmdChargersProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdChargersProcessEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@ import (
|
||||
"reflect"
|
||||
"testing"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -45,7 +44,7 @@ func TestGetCommandValueCase1(t *testing.T) {
|
||||
expected := &CmdGetChargersForEvent{
|
||||
name: "chargers_for_event",
|
||||
rpcMethod: utils.ChargerSv1GetChargersForEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
result, err := GetCommandValue("chargers_for_event", false)
|
||||
if err != nil {
|
||||
|
||||
@@ -36,7 +36,7 @@ func init() {
|
||||
type CmdDispatcherProfile struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func (self *CmdDispatcherProfile) RpcMethod() string {
|
||||
|
||||
func (self *CmdDispatcherProfile) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -98,7 +97,7 @@ func (self *CmdApierPing) PostprocessRpcParams() error {
|
||||
if val, can := self.rpcParams.(*StringWrapper); can {
|
||||
self.item = val.Item
|
||||
}
|
||||
self.rpcParams = &engine.CGREvent{}
|
||||
self.rpcParams = &utils.CGREvent{}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +28,7 @@ func init() {
|
||||
c := &CmdResourceAllocate{
|
||||
name: "resources_allocate",
|
||||
rpcMethod: utils.ResourceSv1AllocateResources,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +38,7 @@ func init() {
|
||||
type CmdResourceAllocate struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +52,7 @@ func (self *CmdResourceAllocate) RpcMethod() string {
|
||||
|
||||
func (self *CmdResourceAllocate) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +28,7 @@ func init() {
|
||||
c := &CmdResourceAuthorize{
|
||||
name: "resources_authorize",
|
||||
rpcMethod: utils.ResourceSv1AuthorizeResources,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +38,7 @@ func init() {
|
||||
type CmdResourceAuthorize struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +52,7 @@ func (self *CmdResourceAuthorize) RpcMethod() string {
|
||||
|
||||
func (self *CmdResourceAuthorize) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdGetResourceForEvent{
|
||||
name: "resources_for_event",
|
||||
rpcMethod: utils.ResourceSv1GetResourcesForEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdGetResourceForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func (self *CmdGetResourceForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetResourceForEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +28,7 @@ func init() {
|
||||
c := &CmdResourceRelease{
|
||||
name: "resources_release",
|
||||
rpcMethod: utils.ResourceSv1ReleaseResources,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +38,7 @@ func init() {
|
||||
type CmdResourceRelease struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +52,7 @@ func (self *CmdResourceRelease) RpcMethod() string {
|
||||
|
||||
func (self *CmdResourceRelease) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdRoutesSort{
|
||||
name: "routes",
|
||||
rpcMethod: utils.RouteSv1GetRoutes,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
type CmdRoutesSort struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (self *CmdRoutesSort) RpcMethod() string {
|
||||
|
||||
func (self *CmdRoutesSort) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ func init() {
|
||||
c := &CmdGetRouteForEvent{
|
||||
name: "routes_profiles_for_event",
|
||||
rpcMethod: utils.RouteSv1GetRouteProfilesForEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -36,7 +36,7 @@ func init() {
|
||||
type CmdGetRouteForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ func (self *CmdGetRouteForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetRouteForEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -18,10 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
package console
|
||||
|
||||
import (
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
import "github.com/cgrates/cgrates/utils"
|
||||
|
||||
func init() {
|
||||
c := &CmdReloadScheduler{
|
||||
@@ -36,7 +33,7 @@ func init() {
|
||||
type CmdReloadScheduler struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -50,7 +47,7 @@ func (self *CmdReloadScheduler) RpcMethod() string {
|
||||
|
||||
func (self *CmdReloadScheduler) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &engine.CGREvent{}
|
||||
self.rpcParams = &utils.CGREvent{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -54,7 +53,7 @@ func (self *CmdSessionsAuthorize) RpcMethod() string {
|
||||
func (self *CmdSessionsAuthorize) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &sessions.V1AuthorizeArgs{
|
||||
CGREvent: new(engine.CGREvent),
|
||||
CGREvent: new(utils.CGREvent),
|
||||
}
|
||||
}
|
||||
return self.rpcParams
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -54,7 +53,7 @@ func (self *CmdSessionsInitiate) RpcMethod() string {
|
||||
func (self *CmdSessionsInitiate) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &sessions.V1InitSessionArgs{
|
||||
CGREvent: new(engine.CGREvent),
|
||||
CGREvent: new(utils.CGREvent),
|
||||
}
|
||||
}
|
||||
return self.rpcParams
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +28,7 @@ func init() {
|
||||
c := &CmdSessionsProcessCDR{
|
||||
name: "session_process_cdr",
|
||||
rpcMethod: utils.SessionSv1ProcessCDR,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +37,7 @@ func init() {
|
||||
type CmdSessionsProcessCDR struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +51,7 @@ func (self *CmdSessionsProcessCDR) RpcMethod() string {
|
||||
|
||||
func (self *CmdSessionsProcessCDR) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -54,7 +53,7 @@ func (self *CmdSessionsProcessEvent) RpcMethod() string {
|
||||
func (self *CmdSessionsProcessEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &sessions.V1ProcessMessageArgs{
|
||||
CGREvent: new(engine.CGREvent),
|
||||
CGREvent: new(utils.CGREvent),
|
||||
}
|
||||
}
|
||||
return self.rpcParams
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -54,7 +53,7 @@ func (self *CmdSessionsTerminate) RpcMethod() string {
|
||||
func (self *CmdSessionsTerminate) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &sessions.V1TerminateSessionArgs{
|
||||
CGREvent: new(engine.CGREvent),
|
||||
CGREvent: new(utils.CGREvent),
|
||||
}
|
||||
}
|
||||
return self.rpcParams
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
@@ -54,7 +53,7 @@ func (self *CmdSessionsUpdate) RpcMethod() string {
|
||||
func (self *CmdSessionsUpdate) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &sessions.V1UpdateSessionArgs{
|
||||
CGREvent: new(engine.CGREvent),
|
||||
CGREvent: new(utils.CGREvent),
|
||||
}
|
||||
}
|
||||
return self.rpcParams
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +28,7 @@ func init() {
|
||||
c := &CmdStatsQueueForEvent{
|
||||
name: "stats_for_event",
|
||||
rpcMethod: utils.StatSv1GetStatQueuesForEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +38,7 @@ func init() {
|
||||
type CmdStatsQueueForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +52,7 @@ func (self *CmdStatsQueueForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdStatsQueueForEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +28,7 @@ func init() {
|
||||
c := &CmdStatQueueProcessEvent{
|
||||
name: "stats_process_event",
|
||||
rpcMethod: utils.StatSv1ProcessEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -39,7 +38,7 @@ func init() {
|
||||
type CmdStatQueueProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -53,7 +52,7 @@ func (self *CmdStatQueueProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdStatQueueProcessEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
c := &CmdThresholdsForEvent{
|
||||
name: "thresholds_for_event",
|
||||
rpcMethod: utils.ThresholdSv1GetThresholdsForEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +38,7 @@ func init() {
|
||||
type CmdThresholdsForEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ func (self *CmdThresholdsForEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdThresholdsForEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -21,7 +21,6 @@ package console
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -29,7 +28,7 @@ func init() {
|
||||
c := &CmdThresholdProcessEvent{
|
||||
name: "thresholds_process_event",
|
||||
rpcMethod: utils.ThresholdSv1ProcessEvent,
|
||||
rpcParams: &engine.CGREvent{},
|
||||
rpcParams: &utils.CGREvent{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -38,7 +37,7 @@ func init() {
|
||||
type CmdThresholdProcessEvent struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.CGREvent
|
||||
rpcParams *utils.CGREvent
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -52,7 +51,7 @@ func (self *CmdThresholdProcessEvent) RpcMethod() string {
|
||||
|
||||
func (self *CmdThresholdProcessEvent) RpcParams(reset bool) any {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.CGREvent)
|
||||
self.rpcParams = new(utils.CGREvent)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user