Finished changing Opts to APIOpts for structs used in api_interfaces

This commit is contained in:
andronache
2021-03-22 16:29:59 +02:00
committed by Dan Christian Bogos
parent 38b02c642c
commit 806c8295be
95 changed files with 600 additions and 600 deletions

View File

@@ -50,7 +50,7 @@ func (self *CmdActiveSessions) RpcMethod() string {
func (self *CmdActiveSessions) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.SessionFilter{Opts: make(map[string]interface{})}
self.rpcParams = &utils.SessionFilter{APIOpts: make(map[string]interface{})}
}
return self.rpcParams

View File

@@ -26,7 +26,7 @@ func init() {
c := &CmdClear{
name: "cache_clear",
rpcMethod: utils.CacheSv1Clear,
rpcParams: &utils.AttrCacheIDsWithOpts{},
rpcParams: &utils.AttrCacheIDsWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -36,7 +36,7 @@ func init() {
type CmdClear struct {
name string
rpcMethod string
rpcParams *utils.AttrCacheIDsWithOpts
rpcParams *utils.AttrCacheIDsWithAPIOpts
*CommandExecuter
}
@@ -50,7 +50,7 @@ func (self *CmdClear) RpcMethod() string {
func (self *CmdClear) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = new(utils.AttrCacheIDsWithOpts)
self.rpcParams = new(utils.AttrCacheIDsWithAPIOpts)
}
return self.rpcParams
}

View File

@@ -26,7 +26,7 @@ func init() {
c := &CmdCacheGetGroupItemIDs{
name: "cache_group_item_ids",
rpcMethod: utils.CacheSv1GetGroupItemIDs,
rpcParams: &utils.ArgsGetGroupWithOpts{},
rpcParams: &utils.ArgsGetGroupWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -36,7 +36,7 @@ func init() {
type CmdCacheGetGroupItemIDs struct {
name string
rpcMethod string
rpcParams *utils.ArgsGetGroupWithOpts
rpcParams *utils.ArgsGetGroupWithAPIOpts
*CommandExecuter
}
@@ -50,7 +50,7 @@ func (self *CmdCacheGetGroupItemIDs) RpcMethod() string {
func (self *CmdCacheGetGroupItemIDs) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.ArgsGetGroupWithOpts{}
self.rpcParams = &utils.ArgsGetGroupWithAPIOpts{}
}
return self.rpcParams
}

View File

@@ -26,7 +26,7 @@ func init() {
c := &CmdCacheHasGroup{
name: "cache_has_group",
rpcMethod: utils.CacheSv1HasGroup,
rpcParams: &utils.ArgsGetGroupWithOpts{},
rpcParams: &utils.ArgsGetGroupWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -36,7 +36,7 @@ func init() {
type CmdCacheHasGroup struct {
name string
rpcMethod string
rpcParams *utils.ArgsGetGroupWithOpts
rpcParams *utils.ArgsGetGroupWithAPIOpts
*CommandExecuter
}
@@ -50,7 +50,7 @@ func (self *CmdCacheHasGroup) RpcMethod() string {
func (self *CmdCacheHasGroup) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.ArgsGetGroupWithOpts{}
self.rpcParams = &utils.ArgsGetGroupWithAPIOpts{}
}
return self.rpcParams
}

View File

@@ -26,7 +26,7 @@ func init() {
c := &CmdGetPrecacheStatus{
name: "cache_precache_status",
rpcMethod: utils.CacheSv1PrecacheStatus,
rpcParams: &utils.AttrCacheIDsWithOpts{},
rpcParams: &utils.AttrCacheIDsWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -36,7 +36,7 @@ func init() {
type CmdGetPrecacheStatus struct {
name string
rpcMethod string
rpcParams *utils.AttrCacheIDsWithOpts
rpcParams *utils.AttrCacheIDsWithAPIOpts
*CommandExecuter
}
@@ -50,7 +50,7 @@ func (self *CmdGetPrecacheStatus) RpcMethod() string {
func (self *CmdGetPrecacheStatus) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = new(utils.AttrCacheIDsWithOpts)
self.rpcParams = new(utils.AttrCacheIDsWithAPIOpts)
}
return self.rpcParams
}

View File

@@ -26,7 +26,7 @@ func init() {
c := &CmdCacheRemoveGroup{
name: "cache_remove_group",
rpcMethod: utils.CacheSv1RemoveGroup,
rpcParams: &utils.ArgsGetGroupWithOpts{},
rpcParams: &utils.ArgsGetGroupWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -36,7 +36,7 @@ func init() {
type CmdCacheRemoveGroup struct {
name string
rpcMethod string
rpcParams *utils.ArgsGetGroupWithOpts
rpcParams *utils.ArgsGetGroupWithAPIOpts
*CommandExecuter
}
@@ -50,7 +50,7 @@ func (self *CmdCacheRemoveGroup) RpcMethod() string {
func (self *CmdCacheRemoveGroup) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.ArgsGetGroupWithOpts{}
self.rpcParams = &utils.ArgsGetGroupWithAPIOpts{}
}
return self.rpcParams
}

View File

@@ -27,7 +27,7 @@ func init() {
c := &CmdGetCacheStats{
name: "cache_stats",
rpcMethod: utils.CacheSv1GetCacheStats,
rpcParams: &utils.AttrCacheIDsWithOpts{},
rpcParams: &utils.AttrCacheIDsWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -37,7 +37,7 @@ func init() {
type CmdGetCacheStats struct {
name string
rpcMethod string
rpcParams *utils.AttrCacheIDsWithOpts
rpcParams *utils.AttrCacheIDsWithAPIOpts
*CommandExecuter
}
@@ -51,7 +51,7 @@ func (self *CmdGetCacheStats) RpcMethod() string {
func (self *CmdGetCacheStats) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = new(utils.AttrCacheIDsWithOpts)
self.rpcParams = new(utils.AttrCacheIDsWithAPIOpts)
}
return self.rpcParams
}

View File

@@ -36,7 +36,7 @@ func init() {
type CmdGetCDRs struct {
name string
rpcMethod string
rpcParams *utils.RPCCDRsFilterWithOpts
rpcParams *utils.RPCCDRsFilterWithAPIOpts
*CommandExecuter
}
@@ -50,7 +50,7 @@ func (self *CmdGetCDRs) RpcMethod() string {
func (self *CmdGetCDRs) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.RPCCDRsFilterWithOpts{
self.rpcParams = &utils.RPCCDRsFilterWithAPIOpts{
RPCCDRsFilter: new(utils.RPCCDRsFilter),
}
}

View File

@@ -27,7 +27,7 @@ func init() {
c := &CmdGetJSONConfig{
name: "get_json_section",
rpcMethod: utils.ConfigSv1GetConfig,
rpcParams: &config.SectionWithOpts{},
rpcParams: &config.SectionWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -37,7 +37,7 @@ func init() {
type CmdGetJSONConfig struct {
name string
rpcMethod string
rpcParams *config.SectionWithOpts
rpcParams *config.SectionWithAPIOpts
*CommandExecuter
}
@@ -51,7 +51,7 @@ func (self *CmdGetJSONConfig) RpcMethod() string {
func (self *CmdGetJSONConfig) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &config.SectionWithOpts{Opts: make(map[string]interface{})}
self.rpcParams = &config.SectionWithAPIOpts{APIOpts: make(map[string]interface{})}
}
return self.rpcParams
}

View File

@@ -50,7 +50,7 @@ func (self *CmdPassiveSessions) RpcMethod() string {
func (self *CmdPassiveSessions) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.SessionFilter{Opts: make(map[string]interface{})}
self.rpcParams = &utils.SessionFilter{APIOpts: make(map[string]interface{})}
}
return self.rpcParams
}

View File

@@ -51,7 +51,7 @@ func (self *CmdRelaodConfigSection) RpcMethod() string {
func (self *CmdRelaodConfigSection) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &config.ReloadArgs{Opts: make(map[string]interface{})}
self.rpcParams = &config.ReloadArgs{APIOpts: make(map[string]interface{})}
}
return self.rpcParams
}

View File

@@ -27,7 +27,7 @@ func init() {
c := &CmdSetResource{
name: "resources_profile_set",
rpcMethod: utils.APIerSv1SetResourceProfile,
rpcParams: &engine.ResourceProfileWithOpts{},
rpcParams: &engine.ResourceProfileWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -37,7 +37,7 @@ func init() {
type CmdSetResource struct {
name string
rpcMethod string
rpcParams *engine.ResourceProfileWithOpts
rpcParams *engine.ResourceProfileWithAPIOpts
*CommandExecuter
}
@@ -51,9 +51,9 @@ func (self *CmdSetResource) RpcMethod() string {
func (self *CmdSetResource) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &engine.ResourceProfileWithOpts{
self.rpcParams = &engine.ResourceProfileWithAPIOpts{
ResourceProfile: new(engine.ResourceProfile),
Opts: make(map[string]interface{}),
APIOpts: make(map[string]interface{}),
}
}
return self.rpcParams

View File

@@ -27,7 +27,7 @@ func init() {
c := &CmdSetStatQueue{
name: "stats_profile_set",
rpcMethod: utils.APIerSv1SetStatQueueProfile,
rpcParams: &engine.StatQueueProfileWithOpts{},
rpcParams: &engine.StatQueueProfileWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -37,7 +37,7 @@ func init() {
type CmdSetStatQueue struct {
name string
rpcMethod string
rpcParams *engine.StatQueueProfileWithOpts
rpcParams *engine.StatQueueProfileWithAPIOpts
*CommandExecuter
}
@@ -51,9 +51,9 @@ func (self *CmdSetStatQueue) RpcMethod() string {
func (self *CmdSetStatQueue) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &engine.StatQueueProfileWithOpts{
self.rpcParams = &engine.StatQueueProfileWithAPIOpts{
StatQueueProfile: new(engine.StatQueueProfile),
Opts: make(map[string]interface{}),
APIOpts: make(map[string]interface{}),
}
}
return self.rpcParams