mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Moving cache for Filter and update cgr-console
This commit is contained in:
committed by
Dan Christian Bogos
parent
3ac9852e2f
commit
ecdfda51ae
@@ -24,7 +24,7 @@ func init() {
|
||||
c := &CmdRemoveFilter{
|
||||
name: "filter_remove",
|
||||
rpcMethod: "ApierV1.RemoveFilter",
|
||||
rpcParams: &utils.TenantID{},
|
||||
rpcParams: &utils.TenantIDWrapper{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -34,7 +34,7 @@ func init() {
|
||||
type CmdRemoveFilter struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *utils.TenantID
|
||||
rpcParams *utils.TenantIDWrapper
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func (self *CmdRemoveFilter) RpcMethod() string {
|
||||
|
||||
func (self *CmdRemoveFilter) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &utils.TenantID{}
|
||||
self.rpcParams = &utils.TenantIDWrapper{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
package console
|
||||
|
||||
import "github.com/cgrates/cgrates/engine"
|
||||
import "github.com/cgrates/cgrates/apier/v1"
|
||||
|
||||
func init() {
|
||||
c := &CmdSetFilter{
|
||||
name: "filter_set",
|
||||
rpcMethod: "ApierV1.SetFilter",
|
||||
rpcParams: &engine.Filter{},
|
||||
rpcParams: &v1.FilterWrapper{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -34,7 +34,7 @@ func init() {
|
||||
type CmdSetFilter struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.Filter
|
||||
rpcParams *v1.FilterWrapper
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func (self *CmdSetFilter) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetFilter) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &engine.Filter{}
|
||||
self.rpcParams = &v1.FilterWrapper{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func init() {
|
||||
c := &CmdRemoveResource{
|
||||
name: "resource_remove",
|
||||
rpcMethod: "ApierV1.RemoveResourceProfile",
|
||||
rpcParams: &utils.TenantID{},
|
||||
rpcParams: &utils.TenantIDWrapper{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -34,7 +34,7 @@ func init() {
|
||||
type CmdRemoveResource struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *utils.TenantID
|
||||
rpcParams *utils.TenantIDWrapper
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func (self *CmdRemoveResource) RpcMethod() string {
|
||||
|
||||
func (self *CmdRemoveResource) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &utils.TenantID{}
|
||||
self.rpcParams = &utils.TenantIDWrapper{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -18,13 +18,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
|
||||
package console
|
||||
|
||||
import "github.com/cgrates/cgrates/engine"
|
||||
import "github.com/cgrates/cgrates/apier/v1"
|
||||
|
||||
func init() {
|
||||
c := &CmdSetResource{
|
||||
name: "resource_set",
|
||||
rpcMethod: "ApierV1.SetResourceProfile",
|
||||
rpcParams: &engine.ResourceProfile{},
|
||||
rpcParams: &v1.ResourceWrapper{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -34,7 +34,7 @@ func init() {
|
||||
type CmdSetResource struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.ResourceProfile
|
||||
rpcParams *v1.ResourceWrapper
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ func (self *CmdSetResource) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetResource) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &engine.ResourceProfile{}
|
||||
self.rpcParams = &v1.ResourceWrapper{}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user