From f0975a0b1afc8a9f8f445ff142678e5a09a56095 Mon Sep 17 00:00:00 2001 From: porosnicuadrian Date: Fri, 11 Dec 2020 12:48:37 +0200 Subject: [PATCH] Added RateProfile interface in api_interface --- apier/v1/api_interfaces.go | 5 +++++ apier/v1/api_interfaces_test.go | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/apier/v1/api_interfaces.go b/apier/v1/api_interfaces.go index 84c1a4e54..ac736765a 100644 --- a/apier/v1/api_interfaces.go +++ b/apier/v1/api_interfaces.go @@ -182,6 +182,11 @@ type CoreSv1Interface interface { type RateSv1Interface interface { Ping(ign *utils.CGREventWithOpts, reply *string) error + CostForEvent(args *utils.ArgsCostForEvent, rpCost *engine.RateProfileCost) error +} + +type RateProfileSv1Interface interface { + Ping(ign *utils.CGREventWithOpts, reply *string) error } type ReplicatorSv1Interface interface { diff --git a/apier/v1/api_interfaces_test.go b/apier/v1/api_interfaces_test.go index 7091e9afa..e3070ffae 100644 --- a/apier/v1/api_interfaces_test.go +++ b/apier/v1/api_interfaces_test.go @@ -64,6 +64,11 @@ func TestResponderInterface(t *testing.T) { _ = ResponderInterface(&engine.Responder{}) } +func TestRateProfileInterface(t *testing.T) { + _ = RateProfileSv1Interface(NewDispatcherRateSv1(nil)) + _ = RateProfileSv1Interface(NewRateSv1(nil)) +} + func TestCacheSv1Interface(t *testing.T) { _ = CacheSv1Interface(NewDispatcherCacheSv1(nil)) _ = CacheSv1Interface(NewCacheSv1(nil))