mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-22 07:38:45 +05:00
Add the missing dispatcher functions
This commit is contained in:
committed by
Dan Christian Bogos
parent
e85a1411c4
commit
c7ac907daf
@@ -40,11 +40,13 @@ import (
|
||||
"github.com/cgrates/cgrates/config"
|
||||
"github.com/cgrates/cgrates/cores"
|
||||
"github.com/cgrates/cgrates/ees"
|
||||
"github.com/cgrates/cgrates/efs"
|
||||
"github.com/cgrates/cgrates/engine"
|
||||
"github.com/cgrates/cgrates/guardian"
|
||||
"github.com/cgrates/cgrates/loaders"
|
||||
"github.com/cgrates/cgrates/rates"
|
||||
"github.com/cgrates/cgrates/sessions"
|
||||
"github.com/cgrates/cgrates/tpes"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
@@ -77,6 +79,8 @@ func main() {
|
||||
{"admins.go", "MetaAdminS", new(apis.AdminSv1), utils.EmptyString},
|
||||
{"cores.go", "MetaCore", new(cores.CoreS), utils.EmptyString},
|
||||
{"guardian.go", "MetaGuardian", guardian.Guardian, utils.GuardianS},
|
||||
{"efs.go", "MetaEFs", new(efs.EfS), utils.EmptyString},
|
||||
{"tpes.go", "MetaTpes", new(tpes.TPeS), utils.EmptyString},
|
||||
// {"servicemanager.go", "MetaServiceManager", new(servmanager.ServiceManager), utils.EmptyString},
|
||||
} {
|
||||
if err := createFile(file.path, file.subsystem, file.customName, file.obj); err != nil {
|
||||
|
||||
62
dispatchers/efs.go
Normal file
62
dispatchers/efs.go
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
|
||||
Copyright (C) ITsysCOM GmbH
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
// do not modify this code because it's generated
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/birpc/context"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
func (dS *DispatcherService) EfSv1Ping(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) {
|
||||
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
||||
if args != nil && len(args.Tenant) != 0 {
|
||||
tnt = args.Tenant
|
||||
}
|
||||
ev := make(map[string]interface{})
|
||||
if args != nil {
|
||||
ev = args.Event
|
||||
}
|
||||
opts := make(map[string]interface{})
|
||||
if args != nil {
|
||||
opts = args.APIOpts
|
||||
}
|
||||
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaEFs, utils.EfSv1Ping, args, reply)
|
||||
}
|
||||
func (dS *DispatcherService) EfSv1ProcessEvent(ctx *context.Context, args *utils.ArgsFailedPosts, reply *string) (err error) {
|
||||
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
||||
if args != nil && len(args.Tenant) != 0 {
|
||||
tnt = args.Tenant
|
||||
}
|
||||
ev := make(map[string]interface{})
|
||||
opts := make(map[string]interface{})
|
||||
if args != nil {
|
||||
opts = args.APIOpts
|
||||
}
|
||||
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaEFs, utils.EfSv1ProcessEvent, args, reply)
|
||||
}
|
||||
func (dS *DispatcherService) EfSv1ReplayEvents(ctx *context.Context, args *utils.ArgsReplayFailedPosts, reply *string) (err error) {
|
||||
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
||||
if args != nil && len(args.Tenant) != 0 {
|
||||
tnt = args.Tenant
|
||||
}
|
||||
ev := make(map[string]interface{})
|
||||
opts := make(map[string]interface{})
|
||||
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaEFs, utils.EfSv1ReplayEvents, args, reply)
|
||||
}
|
||||
54
dispatchers/tpes.go
Normal file
54
dispatchers/tpes.go
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
Real-time Online/Offline Charging System (OCS) for Telecom & ISP environments
|
||||
Copyright (C) ITsysCOM GmbH
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
// do not modify this code because it's generated
|
||||
package dispatchers
|
||||
|
||||
import (
|
||||
"github.com/cgrates/birpc/context"
|
||||
"github.com/cgrates/cgrates/tpes"
|
||||
"github.com/cgrates/cgrates/utils"
|
||||
)
|
||||
|
||||
func (dS *DispatcherService) TPeSv1ExportTariffPlan(ctx *context.Context, args *tpes.ArgsExportTP, reply *[]uint8) (err error) {
|
||||
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
||||
if args != nil && len(args.Tenant) != 0 {
|
||||
tnt = args.Tenant
|
||||
}
|
||||
ev := make(map[string]interface{})
|
||||
opts := make(map[string]interface{})
|
||||
if args != nil {
|
||||
opts = args.APIOpts
|
||||
}
|
||||
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaTpes, utils.TPeSv1ExportTariffPlan, args, reply)
|
||||
}
|
||||
func (dS *DispatcherService) TPeSv1Ping(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) {
|
||||
tnt := dS.cfg.GeneralCfg().DefaultTenant
|
||||
if args != nil && len(args.Tenant) != 0 {
|
||||
tnt = args.Tenant
|
||||
}
|
||||
ev := make(map[string]interface{})
|
||||
if args != nil {
|
||||
ev = args.Event
|
||||
}
|
||||
opts := make(map[string]interface{})
|
||||
if args != nil {
|
||||
opts = args.APIOpts
|
||||
}
|
||||
return dS.Dispatch(ctx, &utils.CGREvent{Tenant: tnt, Event: ev, APIOpts: opts}, utils.MetaTpes, utils.TPeSv1Ping, args, reply)
|
||||
}
|
||||
@@ -1276,6 +1276,7 @@ const (
|
||||
// EfSv1 APIs
|
||||
const (
|
||||
EfSv1 = "EfSv1"
|
||||
EfSv1Ping = "EfSv1.Ping"
|
||||
EfSv1ProcessEvent = "EfSv1.ProcessEvent"
|
||||
EfSv1ReplayEvents = "EfSv1.ReplayEvents"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user