diff --git a/console/attributes.go b/console/attributes.go index 806d52b08..36c41e135 100644 --- a/console/attributes.go +++ b/console/attributes.go @@ -61,6 +61,6 @@ func (self *CmdGetAttributes) PostprocessRpcParams() error { } func (self *CmdGetAttributes) RpcResult() interface{} { - atr := engine.AttributeProfile{} + var atr engine.AttributeProfile return &atr } diff --git a/console/attributes_for_event.go b/console/attributes_for_event.go index d231c0c33..1dbb814a7 100644 --- a/console/attributes_for_event.go +++ b/console/attributes_for_event.go @@ -60,6 +60,6 @@ func (self *CmdGetAttributeForEvent) PostprocessRpcParams() error { } func (self *CmdGetAttributeForEvent) RpcResult() interface{} { - atr := engine.AttributeProfile{} + var atr engine.AttributeProfile return &atr } diff --git a/console/attributes_ids.go b/console/attributes_ids.go index 3c044a56f..2b2ec9266 100644 --- a/console/attributes_ids.go +++ b/console/attributes_ids.go @@ -60,6 +60,6 @@ func (self *CmdGetAttributeIDs) PostprocessRpcParams() error { } func (self *CmdGetAttributeIDs) RpcResult() interface{} { - atr := []string{} + var atr []string return &atr } diff --git a/console/attributes_process_event.go b/console/attributes_process_event.go index 721f54a8b..57f159e4e 100644 --- a/console/attributes_process_event.go +++ b/console/attributes_process_event.go @@ -65,7 +65,7 @@ func (self *CmdAttributesProcessEvent) PostprocessRpcParams() error { } func (self *CmdAttributesProcessEvent) RpcResult() interface{} { - atr := engine.AttrSProcessEventReply{} + var atr engine.AttrSProcessEventReply return &atr } diff --git a/console/cache_group_item_id.go b/console/cache_group_item_id.go index b75e09300..9da42473d 100644 --- a/console/cache_group_item_id.go +++ b/console/cache_group_item_id.go @@ -60,6 +60,6 @@ func (self *CmdCacheGetGroupItemIDs) PostprocessRpcParams() error { } func (self *CmdCacheGetGroupItemIDs) RpcResult() interface{} { - reply := []string{} + var reply []string return &reply } diff --git a/console/cache_item_ids.go b/console/cache_item_ids.go index 3f1ac0d75..7ac796c68 100644 --- a/console/cache_item_ids.go +++ b/console/cache_item_ids.go @@ -60,6 +60,6 @@ func (self *CmdCacheGetItemIDs) PostprocessRpcParams() error { } func (self *CmdCacheGetItemIDs) RpcResult() interface{} { - reply := []string{} + var reply []string return &reply } diff --git a/console/charger_ids.go b/console/charger_ids.go index 5d58bac1c..3109257dc 100644 --- a/console/charger_ids.go +++ b/console/charger_ids.go @@ -60,6 +60,6 @@ func (self *CmdGetChargerIDs) PostprocessRpcParams() error { } func (self *CmdGetChargerIDs) RpcResult() interface{} { - atr := []string{} + var atr []string return &atr } diff --git a/console/chargers.go b/console/chargers.go index a91280d4a..c889387ad 100644 --- a/console/chargers.go +++ b/console/chargers.go @@ -61,6 +61,6 @@ func (self *CmdGetChargers) PostprocessRpcParams() error { } func (self *CmdGetChargers) RpcResult() interface{} { - atr := engine.ChargerProfile{} + var atr engine.ChargerProfile return &atr } diff --git a/console/chargers_for_event.go b/console/chargers_for_event.go index 637d30e13..8279addaf 100644 --- a/console/chargers_for_event.go +++ b/console/chargers_for_event.go @@ -63,6 +63,6 @@ func (self *CmdGetChargersForEvent) PostprocessRpcParams() error { } func (self *CmdGetChargersForEvent) RpcResult() interface{} { - atr := engine.ChargerProfiles{} + var atr engine.ChargerProfiles return &atr } diff --git a/console/chargers_process_event.go b/console/chargers_process_event.go index 8fb84def1..2066c5bc5 100644 --- a/console/chargers_process_event.go +++ b/console/chargers_process_event.go @@ -68,7 +68,7 @@ func (self *CmdChargersProcessEvent) PostprocessRpcParams() error { } func (self *CmdChargersProcessEvent) RpcResult() interface{} { - atr := []*engine.ChrgSProcessEventReply{} + var atr []*engine.ChrgSProcessEventReply return &atr } diff --git a/console/datadb_versions.go b/console/datadb_versions.go index 686367072..bac88cc10 100644 --- a/console/datadb_versions.go +++ b/console/datadb_versions.go @@ -59,7 +59,7 @@ func (self *CmdGetDataDBVersions) PostprocessRpcParams() error { } func (self *CmdGetDataDBVersions) RpcResult() interface{} { - s := engine.Versions{} + var s engine.Versions return &s } diff --git a/console/filter.go b/console/filter.go index 720746609..51c7ed995 100644 --- a/console/filter.go +++ b/console/filter.go @@ -61,6 +61,6 @@ func (self *CmdGetFilter) PostprocessRpcParams() error { } func (self *CmdGetFilter) RpcResult() interface{} { - atr := engine.Filter{} + var atr engine.Filter return &atr } diff --git a/console/filter_ids.go b/console/filter_ids.go index a3fe09685..2c0f4add9 100644 --- a/console/filter_ids.go +++ b/console/filter_ids.go @@ -60,6 +60,6 @@ func (self *CmdGetFilterIDs) PostprocessRpcParams() error { } func (self *CmdGetFilterIDs) RpcResult() interface{} { - atr := []string{} + var atr []string return &atr } diff --git a/console/resource.go b/console/resource.go index 5894d0a28..392d6cbee 100644 --- a/console/resource.go +++ b/console/resource.go @@ -61,6 +61,6 @@ func (self *CmdGetResource) PostprocessRpcParams() error { } func (self *CmdGetResource) RpcResult() interface{} { - atr := engine.Resource{} + var atr engine.Resource return &atr } diff --git a/console/resource_ids.go b/console/resource_ids.go index 2cbd7763b..c72ec638e 100644 --- a/console/resource_ids.go +++ b/console/resource_ids.go @@ -60,6 +60,6 @@ func (self *CmdGetResourceIDs) PostprocessRpcParams() error { } func (self *CmdGetResourceIDs) RpcResult() interface{} { - atr := []string{} + var atr []string return &atr } diff --git a/console/resource_profile.go b/console/resource_profile.go index 1adb223d0..19f8ff047 100644 --- a/console/resource_profile.go +++ b/console/resource_profile.go @@ -61,7 +61,7 @@ func (self *CmdGetResourceProfile) PostprocessRpcParams() error { } func (self *CmdGetResourceProfile) RpcResult() interface{} { - atr := engine.ResourceProfile{} + var atr engine.ResourceProfile return &atr } diff --git a/console/statqueue.go b/console/statqueue.go index d77790e38..b05386a0d 100644 --- a/console/statqueue.go +++ b/console/statqueue.go @@ -24,8 +24,8 @@ import ( ) func init() { - c := &CmdGetStatQueue{ - name: "statqueue", + c := &CmdGetStatQueueProfile{ + name: "statqueue_profile", rpcMethod: utils.ApierV1GetStatQueueProfile, rpcParams: &utils.TenantID{}, } @@ -34,38 +34,38 @@ func init() { } // Commander implementation -type CmdGetStatQueue struct { +type CmdGetStatQueueProfile struct { name string rpcMethod string rpcParams *utils.TenantID *CommandExecuter } -func (self *CmdGetStatQueue) Name() string { +func (self *CmdGetStatQueueProfile) Name() string { return self.name } -func (self *CmdGetStatQueue) RpcMethod() string { +func (self *CmdGetStatQueueProfile) RpcMethod() string { return self.rpcMethod } -func (self *CmdGetStatQueue) RpcParams(reset bool) interface{} { +func (self *CmdGetStatQueueProfile) RpcParams(reset bool) interface{} { if reset || self.rpcParams == nil { self.rpcParams = &utils.TenantID{} } return self.rpcParams } -func (self *CmdGetStatQueue) PostprocessRpcParams() error { +func (self *CmdGetStatQueueProfile) PostprocessRpcParams() error { return nil } -func (self *CmdGetStatQueue) RpcResult() interface{} { - atr := engine.StatQueueProfile{} +func (self *CmdGetStatQueueProfile) RpcResult() interface{} { + var atr engine.StatQueueProfile return &atr } -func (self *CmdGetStatQueue) GetFormatedResult(result interface{}) string { +func (self *CmdGetStatQueueProfile) GetFormatedResult(result interface{}) string { return GetFormatedResult(result, map[string]struct{}{ "TTL": struct{}{}, }) diff --git a/console/statqueue_ids.go b/console/statqueue_ids.go index 3344ead2a..ff677fd7b 100644 --- a/console/statqueue_ids.go +++ b/console/statqueue_ids.go @@ -60,6 +60,6 @@ func (self *CmdGetStatQueueIDs) PostprocessRpcParams() error { } func (self *CmdGetStatQueueIDs) RpcResult() interface{} { - atr := []string{} + var atr []string return &atr } diff --git a/console/supplier_get.go b/console/supplier_get.go index e4c670680..924853c24 100644 --- a/console/supplier_get.go +++ b/console/supplier_get.go @@ -60,6 +60,6 @@ func (self *CmdGetSupplier) PostprocessRpcParams() error { } func (self *CmdGetSupplier) RpcResult() interface{} { - atr := engine.SupplierProfile{} + var atr engine.SupplierProfile return &atr } diff --git a/console/supplier_profiles_for_event.go b/console/supplier_profiles_for_event.go index 6ae31bf01..cd412d865 100644 --- a/console/supplier_profiles_for_event.go +++ b/console/supplier_profiles_for_event.go @@ -62,6 +62,6 @@ func (self *CmdGetSupplierForEvent) PostprocessRpcParams() error { } func (self *CmdGetSupplierForEvent) RpcResult() interface{} { - atr := []*engine.SupplierProfile{} + var atr []*engine.SupplierProfile return &atr } diff --git a/console/threshold.go b/console/threshold.go index 8bea54684..fb2031455 100644 --- a/console/threshold.go +++ b/console/threshold.go @@ -63,7 +63,7 @@ func (self *CmdGetThreshold) PostprocessRpcParams() error { } func (self *CmdGetThreshold) RpcResult() interface{} { - atr := engine.Threshold{} + var atr engine.Threshold return &atr } diff --git a/console/threshold_ids.go b/console/threshold_ids.go index 9398bb128..62b18c886 100644 --- a/console/threshold_ids.go +++ b/console/threshold_ids.go @@ -59,6 +59,6 @@ func (self *CmdGetThresholdIDs) PostprocessRpcParams() error { } func (self *CmdGetThresholdIDs) RpcResult() interface{} { - atr := []string{} + var atr []string return &atr } diff --git a/console/threshold_profile.go b/console/threshold_profile.go index 8d6e55a55..5379ea291 100644 --- a/console/threshold_profile.go +++ b/console/threshold_profile.go @@ -63,7 +63,7 @@ func (self *CmdGetThresholdProfile) PostprocessRpcParams() error { } func (self *CmdGetThresholdProfile) RpcResult() interface{} { - atr := engine.ThresholdProfile{} + var atr engine.ThresholdProfile return &atr } diff --git a/console/triggers.go b/console/triggers.go index 82f652a75..bcb781a19 100644 --- a/console/triggers.go +++ b/console/triggers.go @@ -61,7 +61,7 @@ func (self *CmdGetTriggers) PostprocessRpcParams() error { } func (self *CmdGetTriggers) RpcResult() interface{} { - atr := engine.ActionTriggers{} + var atr engine.ActionTriggers return &atr }