From b779c4685c78f69fccf3abf3fbfd7df56609a38d Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Mon, 30 Nov 2015 14:35:59 +0200 Subject: [PATCH] added actions console command --- console/actions.go | 60 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 console/actions.go diff --git a/console/actions.go b/console/actions.go new file mode 100644 index 000000000..3365a87b6 --- /dev/null +++ b/console/actions.go @@ -0,0 +1,60 @@ +/* +Real-time Charging System for Telecom & ISP environments +Copyright (C) 2012-2015 ITsysCOM GmbH + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see +*/ + +package console + +import "github.com/cgrates/cgrates/utils" + +func init() { + c := &CmdGetActions{ + name: "actions", + rpcMethod: "ApierV2.GetActions", + rpcParams: "", + } + commands[c.Name()] = c + c.CommandExecuter = &CommandExecuter{c} +} + +// Commander implementation +type CmdGetActions struct { + name string + rpcMethod string + rpcParams string + *CommandExecuter +} + +func (self *CmdGetActions) Name() string { + return self.name +} + +func (self *CmdGetActions) RpcMethod() string { + return self.rpcMethod +} + +func (self *CmdGetActions) RpcParams(reset bool) interface{} { + return self.rpcParams +} + +func (self *CmdGetActions) PostprocessRpcParams() error { + return nil +} + +func (self *CmdGetActions) RpcResult() interface{} { + a := make([]*utils.TPAction, 0) + return &a +}