From fb03793c6ba73ee0bff55dafd61e5b9cddcb427c Mon Sep 17 00:00:00 2001 From: gezimbll Date: Mon, 23 Feb 2026 09:34:44 +0100 Subject: [PATCH] remove V1 prefix from apis wrapper methods --- apis/attributes.go | 8 ++++---- apis/cdrs.go | 6 +++--- apis/chargers.go | 4 ++-- apis/ips.go | 12 ++++++------ apis/rankings.go | 8 ++++---- apis/rates.go | 6 +++--- apis/resources.go | 12 ++++++------ apis/routes.go | 4 ++-- apis/trends.go | 8 ++++---- 9 files changed, 34 insertions(+), 34 deletions(-) diff --git a/apis/attributes.go b/apis/attributes.go index 773ece408..db915c7a4 100644 --- a/apis/attributes.go +++ b/apis/attributes.go @@ -196,11 +196,11 @@ type AttributeSv1 struct { } // V1GetAttributeForEvent returns the AttributeProfile that matches the event -func (atrS *AttributeSv1) V1GetAttributeForEvent(ctx *context.Context, args *utils.CGREvent, attrPrf *utils.APIAttributeProfile) (err error) { - return atrS.V1GetAttributeForEvent(ctx, args, attrPrf) +func (atrS *AttributeSv1) GetAttributeForEvent(ctx *context.Context, args *utils.CGREvent, attrPrf *utils.APIAttributeProfile) (err error) { + return atrS.atrs.V1GetAttributeForEvent(ctx, args, attrPrf) } // V1ProcessEvent proccess the event and returns the result -func (atrS *AttributeSv1) V1ProcessEvent(ctx *context.Context, args *utils.CGREvent, attrEvntRpl *attributes.AttrSProcessEventReply) (err error) { - return atrS.V1ProcessEvent(ctx, args, attrEvntRpl) +func (atrS *AttributeSv1) ProcessEvent(ctx *context.Context, args *utils.CGREvent, attrEvntRpl *attributes.AttrSProcessEventReply) (err error) { + return atrS.atrs.V1ProcessEvent(ctx, args, attrEvntRpl) } diff --git a/apis/cdrs.go b/apis/cdrs.go index 25aa1bbc2..b05f7fbc7 100644 --- a/apis/cdrs.go +++ b/apis/cdrs.go @@ -72,16 +72,16 @@ type CdrSv1 struct { } // V1ProcessEvent will process the CGREvent -func (cdrS *CdrSv1) V1ProcessEvent(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { +func (cdrS *CdrSv1) ProcessEvent(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { return cdrS.cdrs.V1ProcessEvent(ctx, args, reply) } // V1ProcessEventWithGet has the same logic with V1ProcessEvent except it adds the proccessed events to the reply -func (cdrS *CdrSv1) V1ProcessEventWithGet(ctx *context.Context, args *utils.CGREvent, evs *[]*utils.EventsWithOpts) (err error) { +func (cdrS *CdrSv1) ProcessEventWithGet(ctx *context.Context, args *utils.CGREvent, evs *[]*utils.EventsWithOpts) (err error) { return cdrS.cdrs.V1ProcessEventWithGet(ctx, args, evs) } // V1ProcessStoredEvents processes stored events based on provided filters. -func (cdrS *CdrSv1) V1ProcessStoredEvents(ctx *context.Context, args *utils.CDRFilters, reply *string) (err error) { +func (cdrS *CdrSv1) ProcessStoredEvents(ctx *context.Context, args *utils.CDRFilters, reply *string) (err error) { return cdrS.cdrs.V1ProcessStoredEvents(ctx, args, reply) } diff --git a/apis/chargers.go b/apis/chargers.go index e2eda78ef..3d33f9eb1 100644 --- a/apis/chargers.go +++ b/apis/chargers.go @@ -192,11 +192,11 @@ type ChargerSv1 struct { } // V1ProcessEvent will process the event received via API and return list of events forked -func (chgS *ChargerSv1) V1ProcessEvent(ctx *context.Context, args *utils.CGREvent, reply *[]*chargers.ChrgSProcessEventReply) (err error) { +func (chgS *ChargerSv1) ProcessEvent(ctx *context.Context, args *utils.CGREvent, reply *[]*chargers.ChrgSProcessEventReply) (err error) { return chgS.chgs.V1ProcessEvent(ctx, args, reply) } // V1GetChargersForEvent exposes the list of ordered matching ChargingProfiles for an event -func (chgS *ChargerSv1) V1GetChargersForEvent(ctx *context.Context, args *utils.CGREvent, rply *[]*utils.ChargerProfile) (err error) { +func (chgS *ChargerSv1) GetChargersForEvent(ctx *context.Context, args *utils.CGREvent, rply *[]*utils.ChargerProfile) (err error) { return chgS.chgs.V1GetChargersForEvent(ctx, args, rply) } diff --git a/apis/ips.go b/apis/ips.go index 4ab215a2a..777c84cd0 100644 --- a/apis/ips.go +++ b/apis/ips.go @@ -195,32 +195,32 @@ type IPSv1 struct { } // V1GetIPAllocationForEvent returns the IPAllocations object matching the event. -func (ipS *IPSv1) V1GetIPAllocationForEvent(ctx *context.Context, args *utils.CGREvent, reply *utils.IPAllocations) error { +func (ipS *IPSv1) GetIPAllocationForEvent(ctx *context.Context, args *utils.CGREvent, reply *utils.IPAllocations) error { return ipS.ips.V1GetIPAllocationForEvent(ctx, args, reply) } // V1AuthorizeIP checks if it's able to allocate an IP address for the given event. -func (ipS *IPSv1) V1AuthorizeIP(ctx *context.Context, args *utils.CGREvent, reply *utils.AllocatedIP) error { +func (ipS *IPSv1) AuthorizeIP(ctx *context.Context, args *utils.CGREvent, reply *utils.AllocatedIP) error { return ipS.ips.V1AuthorizeIP(ctx, args, reply) } // V1AllocateIP allocates an IP address for the given event. -func (ipS *IPSv1) V1AllocateIP(ctx *context.Context, args *utils.CGREvent, reply *utils.AllocatedIP) error { +func (ipS *IPSv1) AllocateIP(ctx *context.Context, args *utils.CGREvent, reply *utils.AllocatedIP) error { return ipS.ips.V1AllocateIP(ctx, args, reply) } // V1ReleaseIP releases an allocated IP address for the given event. -func (ipS *IPSv1) V1ReleaseIP(ctx *context.Context, args *utils.CGREvent, reply *string) error { +func (ipS *IPSv1) ReleaseIP(ctx *context.Context, args *utils.CGREvent, reply *string) error { return ipS.ips.V1ReleaseIP(ctx, args, reply) } // V1GetIPAllocations returns all IP allocations for a tenantID. -func (ipS *IPSv1) V1GetIPAllocations(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.IPAllocations) error { +func (ipS *IPSv1) GetIPAllocations(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.IPAllocations) error { return ipS.ips.V1GetIPAllocations(ctx, arg, reply) } // V1ClearIPAllocations clears IP allocations from an IPAllocations object. // If args.AllocationIDs is empty or nil, all allocations will be cleared. -func (ipS *IPSv1) V1ClearIPAllocations(ctx *context.Context, arg *utils.ClearIPAllocationsArgs, reply *string) error { +func (ipS *IPSv1) ClearIPAllocations(ctx *context.Context, arg *utils.ClearIPAllocationsArgs, reply *string) error { return ipS.ips.V1ClearIPAllocations(ctx, arg, reply) } diff --git a/apis/rankings.go b/apis/rankings.go index b186de376..3d7ba81d4 100644 --- a/apis/rankings.go +++ b/apis/rankings.go @@ -193,21 +193,21 @@ type RankingSv1 struct { } // V1ScheduleQueries manually schedules or reschedules ranking queries. -func (rnkS *RankingSv1) V1ScheduleQueries(ctx *context.Context, args *utils.ArgScheduleRankingQueries, scheduled *int) (err error) { +func (rnkS *RankingSv1) ScheduleQueries(ctx *context.Context, args *utils.ArgScheduleRankingQueries, scheduled *int) (err error) { return rnkS.rnkS.V1ScheduleQueries(ctx, args, scheduled) } // V1GetRanking retrieves ranking metrics with optional filtering. -func (rnkS *RankingSv1) V1GetRanking(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, retRanking *utils.Ranking) (err error) { +func (rnkS *RankingSv1) GetRanking(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, retRanking *utils.Ranking) (err error) { return rnkS.rnkS.V1GetRanking(ctx, arg, retRanking) } // V1GetSchedule retrieves information about currently scheduled rankings. -func (rnkS *RankingSv1) V1GetSchedule(ctx *context.Context, args *utils.ArgScheduledRankings, schedRankings *[]utils.ScheduledRanking) (err error) { +func (rnkS *RankingSv1) GetSchedule(ctx *context.Context, args *utils.ArgScheduledRankings, schedRankings *[]utils.ScheduledRanking) (err error) { return rnkS.rnkS.V1GetSchedule(ctx, args, schedRankings) } // V1GetRankingSummary retrieves the most recent ranking summary. -func (rnkS *RankingSv1) V1GetRankingSummary(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.RankingSummary) (err error) { +func (rnkS *RankingSv1) GetRankingSummary(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.RankingSummary) (err error) { return rnkS.rnkS.V1GetRankingSummary(ctx, arg, reply) } diff --git a/apis/rates.go b/apis/rates.go index 84d822e92..46f653127 100644 --- a/apis/rates.go +++ b/apis/rates.go @@ -326,12 +326,12 @@ type RateSv1 struct { } // V1RateProfilesForEvent will be called to list the RateProfilesIDs that are matching the event -func (rtS *RateSv1) V1RateProfilesForEvent(ctx *context.Context, args *utils.CGREvent, rpIDs *[]string) (err error) { +func (rtS *RateSv1) RateProfilesForEvent(ctx *context.Context, args *utils.CGREvent, rpIDs *[]string) (err error) { return rtS.rtS.V1RateProfilesForEvent(ctx, args, rpIDs) } // RateProfilesForEvent returns the list of rates that are matching the event from a specific profile -func (rS *RateSv1) V1RateProfileRatesForEvent(ctx *context.Context, args *utils.CGREventWithRateProfile, rtIDs *[]string) (err error) { +func (rS *RateSv1) RateProfileRatesForEvent(ctx *context.Context, args *utils.CGREventWithRateProfile, rtIDs *[]string) (err error) { return rS.rtS.V1RateProfileRatesForEvent(ctx, args, rtIDs) } @@ -339,6 +339,6 @@ func (rS *RateSv1) V1RateProfileRatesForEvent(ctx *context.Context, args *utils. // profiles. If a higher priority profile fails, it tries the next matching // profile. This continues until a valid cost is found or all profiles are // exhausted. -func (rS *RateSv1) V1CostForEvent(ctx *context.Context, args *utils.CGREvent, rpCost *utils.RateProfileCost) (err error) { +func (rS *RateSv1) CostForEvent(ctx *context.Context, args *utils.CGREvent, rpCost *utils.RateProfileCost) (err error) { return rS.rtS.V1CostForEvent(ctx, args, rpCost) } diff --git a/apis/resources.go b/apis/resources.go index 2fa6dfd75..8d39cd56b 100644 --- a/apis/resources.go +++ b/apis/resources.go @@ -196,31 +196,31 @@ type ResourceSv1 struct { } // V1GetResourcesForEvent returns active resource configs matching the event -func (rS *ResourceSv1) V1GetResourcesForEvent(ctx *context.Context, args *utils.CGREvent, reply *resources.Resources) (err error) { +func (rS *ResourceSv1) GetResourcesForEvent(ctx *context.Context, args *utils.CGREvent, reply *resources.Resources) (err error) { return rS.rsS.V1GetResourcesForEvent(ctx, args, reply) } // V1AuthorizeResources queries service to find if an Usage is allowed -func (rS *ResourceSv1) V1AuthorizeResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { +func (rS *ResourceSv1) AuthorizeResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { return rS.rsS.V1AuthorizeResources(ctx, args, reply) } // V1AllocateResources is called when a resource requires allocation -func (rS *ResourceSv1) V1AllocateResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { +func (rS *ResourceSv1) AllocateResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { return rS.rsS.V1AllocateResources(ctx, args, reply) } // V1ReleaseResources is called when we need to clear an allocation -func (rS *ResourceSv1) V1ReleaseResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { +func (rS *ResourceSv1) ReleaseResources(ctx *context.Context, args *utils.CGREvent, reply *string) (err error) { return rS.rsS.V1ReleaseResources(ctx, args, reply) } // V1GetResource returns a resource -func (rS *ResourceSv1) V1GetResource(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.Resource) error { +func (rS *ResourceSv1) GetResource(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.Resource) error { return rS.rsS.V1GetResource(ctx, arg, reply) } // V1GetResource returns a resource configuration -func (rS *ResourceSv1) V1GetResourceWithConfig(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.ResourceWithConfig) (err error) { +func (rS *ResourceSv1) GetResourceWithConfig(ctx *context.Context, arg *utils.TenantIDWithAPIOpts, reply *utils.ResourceWithConfig) (err error) { return rS.rsS.V1GetResourceWithConfig(ctx, arg, reply) } diff --git a/apis/routes.go b/apis/routes.go index 7bcefbd0f..94bdc8070 100644 --- a/apis/routes.go +++ b/apis/routes.go @@ -193,11 +193,11 @@ type RouteSv1 struct { } // V1GetRoutes returns the list of valid routes. -func (rpS *RouteSv1) V1GetRoutes(ctx *context.Context, args *utils.CGREvent, reply *routes.SortedRoutesList) (err error) { +func (rpS *RouteSv1) GetRoutes(ctx *context.Context, args *utils.CGREvent, reply *routes.SortedRoutesList) (err error) { return rpS.rpS.V1GetRoutes(ctx, args, reply) } // V1GetRoutesList returns the list of valid routes. -func (rpS *RouteSv1) V1GetRoutesList(ctx *context.Context, args *utils.CGREvent, reply *[]string) (err error) { +func (rpS *RouteSv1) GetRoutesList(ctx *context.Context, args *utils.CGREvent, reply *[]string) (err error) { return rpS.rpS.V1GetRoutesList(ctx, args, reply) } diff --git a/apis/trends.go b/apis/trends.go index 4b6bbb1b8..3628581c9 100644 --- a/apis/trends.go +++ b/apis/trends.go @@ -192,21 +192,21 @@ type TrendSv1 struct { } // V1ScheduleQueries manually schedules or reschedules trend queries. -func (tS *TrendSv1) V1ScheduleQueries(ctx *context.Context, args *utils.ArgScheduleTrendQueries, scheduled *int) (err error) { +func (tS *TrendSv1) ScheduleQueries(ctx *context.Context, args *utils.ArgScheduleTrendQueries, scheduled *int) (err error) { return tS.trndS.V1ScheduleQueries(ctx, args, scheduled) } // V1GetTrend retrieves trend metrics with optional time and index filtering. -func (tS *TrendSv1) V1GetTrend(ctx *context.Context, arg *utils.ArgGetTrend, retTrend *utils.Trend) (err error) { +func (tS *TrendSv1) GetTrend(ctx *context.Context, arg *utils.ArgGetTrend, retTrend *utils.Trend) (err error) { return tS.trndS.V1GetTrend(ctx, arg, retTrend) } // V1GetScheduledTrends retrieves information about currently scheduled trends. -func (tS *TrendSv1) V1GetScheduledTrends(ctx *context.Context, args *utils.ArgScheduledTrends, schedTrends *[]utils.ScheduledTrend) (err error) { +func (tS *TrendSv1) GetScheduledTrends(ctx *context.Context, args *utils.ArgScheduledTrends, schedTrends *[]utils.ScheduledTrend) (err error) { return tS.trndS.V1GetScheduledTrends(ctx, args, schedTrends) } // V1GetTrendSummary retrieves the most recent trend summary. -func (tS *TrendSv1) V1GetTrendSummary(ctx *context.Context, arg utils.TenantIDWithAPIOpts, reply *utils.TrendSummary) (err error) { +func (tS *TrendSv1) GetTrendSummary(ctx *context.Context, arg utils.TenantIDWithAPIOpts, reply *utils.TrendSummary) (err error) { return tS.trndS.V1GetTrendSummary(ctx, arg, reply) }