mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Changed Opts in structs in apier to APIOpts
This commit is contained in:
committed by
Dan Christian Bogos
parent
806c8295be
commit
0d36b0cecf
@@ -28,7 +28,7 @@ func init() {
|
||||
c := &CmdSetAttributes{
|
||||
name: "attributes_profile_set",
|
||||
rpcMethod: utils.APIerSv2SetAttributeProfile,
|
||||
rpcParams: &v2.AttributeWithOpts{},
|
||||
rpcParams: &v2.AttributeWithAPIOpts{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
type CmdSetAttributes struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *v2.AttributeWithOpts
|
||||
rpcParams *v2.AttributeWithAPIOpts
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (self *CmdSetAttributes) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetAttributes) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &v2.AttributeWithOpts{APIAttributeProfile: new(engine.APIAttributeProfile)}
|
||||
self.rpcParams = &v2.AttributeWithAPIOpts{APIAttributeProfile: new(engine.APIAttributeProfile)}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ func init() {
|
||||
c := &CmdSetChargers{
|
||||
name: "chargers_profile_set",
|
||||
rpcMethod: utils.APIerSv1SetChargerProfile,
|
||||
rpcParams: &v1.ChargerWithOpts{},
|
||||
rpcParams: &v1.ChargerWithAPIOpts{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
type CmdSetChargers struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *v1.ChargerWithOpts
|
||||
rpcParams *v1.ChargerWithAPIOpts
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ func (self *CmdSetChargers) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetChargers) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &v1.ChargerWithOpts{ChargerProfile: new(engine.ChargerProfile)}
|
||||
self.rpcParams = &v1.ChargerWithAPIOpts{ChargerProfile: new(engine.ChargerProfile)}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ func (self *CmdGetCost) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetCost) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &v1.AttrGetCost{Opts: make(map[string]interface{})}
|
||||
self.rpcParams = &v1.AttrGetCost{APIOpts: make(map[string]interface{})}
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ func init() {
|
||||
type CmdGetMaxUsage struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *engine.UsageRecordWithOpts
|
||||
rpcParams *engine.UsageRecordWithAPIOpts
|
||||
clientArgs []string
|
||||
*CommandExecuter
|
||||
}
|
||||
@@ -54,7 +54,7 @@ func (self *CmdGetMaxUsage) RpcMethod() string {
|
||||
|
||||
func (self *CmdGetMaxUsage) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = new(engine.UsageRecordWithOpts)
|
||||
self.rpcParams = new(engine.UsageRecordWithAPIOpts)
|
||||
}
|
||||
return self.rpcParams
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ func init() {
|
||||
c := &CmdSetRateProfile{
|
||||
name: "rates_profile_set",
|
||||
rpcMethod: utils.APIerSv1SetRateProfile,
|
||||
rpcParams: &utils.APIRateProfileWithOpts{},
|
||||
rpcParams: &utils.APIRateProfileWithAPIOpts{},
|
||||
}
|
||||
commands[c.Name()] = c
|
||||
c.CommandExecuter = &CommandExecuter{c}
|
||||
@@ -35,7 +35,7 @@ func init() {
|
||||
type CmdSetRateProfile struct {
|
||||
name string
|
||||
rpcMethod string
|
||||
rpcParams *utils.APIRateProfileWithOpts
|
||||
rpcParams *utils.APIRateProfileWithAPIOpts
|
||||
*CommandExecuter
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ func (self *CmdSetRateProfile) RpcMethod() string {
|
||||
|
||||
func (self *CmdSetRateProfile) RpcParams(reset bool) interface{} {
|
||||
if reset || self.rpcParams == nil {
|
||||
self.rpcParams = &utils.APIRateProfileWithOpts{
|
||||
self.rpcParams = &utils.APIRateProfileWithAPIOpts{
|
||||
APIRateProfile: new(utils.APIRateProfile),
|
||||
Opts: make(map[string]interface{}),
|
||||
APIOpts: make(map[string]interface{}),
|
||||
}
|
||||
}
|
||||
return self.rpcParams
|
||||
|
||||
Reference in New Issue
Block a user