Changed in multiple structs the field Opts to APIOpts

This commit is contained in:
andronache
2021-03-18 13:16:09 +02:00
committed by Dan Christian Bogos
parent 2938a85146
commit 804cc12c9e
89 changed files with 434 additions and 433 deletions

View File

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

View File

@@ -28,7 +28,7 @@ func init() {
c := &CmdCacheGetItemExpiryTime{
name: "cache_item_expiry_time",
rpcMethod: utils.CacheSv1GetItemExpiryTime,
rpcParams: &utils.ArgsGetCacheItemWithOpts{},
rpcParams: &utils.ArgsGetCacheItemWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -38,7 +38,7 @@ func init() {
type CmdCacheGetItemExpiryTime struct {
name string
rpcMethod string
rpcParams *utils.ArgsGetCacheItemWithOpts
rpcParams *utils.ArgsGetCacheItemWithAPIOpts
*CommandExecuter
}
@@ -52,7 +52,7 @@ func (self *CmdCacheGetItemExpiryTime) RpcMethod() string {
func (self *CmdCacheGetItemExpiryTime) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.ArgsGetCacheItemWithOpts{}
self.rpcParams = &utils.ArgsGetCacheItemWithAPIOpts{}
}
return self.rpcParams
}

View File

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

View File

@@ -24,7 +24,7 @@ func init() {
c := &CmdReloadCache{
name: "cache_reload",
rpcMethod: utils.CacheSv1ReloadCache,
rpcParams: &utils.AttrReloadCacheWithOpts{},
rpcParams: &utils.AttrReloadCacheWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -34,7 +34,7 @@ func init() {
type CmdReloadCache struct {
name string
rpcMethod string
rpcParams *utils.AttrReloadCacheWithOpts
rpcParams *utils.AttrReloadCacheWithAPIOpts
rpcResult string
*CommandExecuter
}
@@ -49,7 +49,7 @@ func (self *CmdReloadCache) RpcMethod() string {
func (self *CmdReloadCache) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.AttrReloadCacheWithOpts{}
self.rpcParams = &utils.AttrReloadCacheWithAPIOpts{}
}
return self.rpcParams
}

View File

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

View File

@@ -32,7 +32,7 @@ func init() {
type CmdStatus struct {
name string
rpcMethod string
rpcParams *utils.TenantWithOpts
rpcParams *utils.TenantWithAPIOpts
*CommandExecuter
}
@@ -46,8 +46,8 @@ func (self *CmdStatus) RpcMethod() string {
func (self *CmdStatus) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &utils.TenantWithOpts{
Opts: make(map[string]interface{}),
self.rpcParams = &utils.TenantWithAPIOpts{
APIOpts: make(map[string]interface{}),
}
}
return self.rpcParams

View File

@@ -27,7 +27,7 @@ func init() {
c := &CmdSetThreshold{
name: "thresholds_profile_set",
rpcMethod: utils.APIerSv1SetThresholdProfile,
rpcParams: &engine.ThresholdProfileWithOpts{},
rpcParams: &engine.ThresholdProfileWithAPIOpts{},
}
commands[c.Name()] = c
c.CommandExecuter = &CommandExecuter{c}
@@ -37,7 +37,7 @@ func init() {
type CmdSetThreshold struct {
name string
rpcMethod string
rpcParams *engine.ThresholdProfileWithOpts
rpcParams *engine.ThresholdProfileWithAPIOpts
*CommandExecuter
}
@@ -51,9 +51,9 @@ func (self *CmdSetThreshold) RpcMethod() string {
func (self *CmdSetThreshold) RpcParams(reset bool) interface{} {
if reset || self.rpcParams == nil {
self.rpcParams = &engine.ThresholdProfileWithOpts{
self.rpcParams = &engine.ThresholdProfileWithAPIOpts{
ThresholdProfile: new(engine.ThresholdProfile),
Opts: map[string]interface{}{},
APIOpts: map[string]interface{}{},
}
}
return self.rpcParams