cron

package
v1.0.34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2025 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreditGrantCronHandler added in v1.0.18

type CreditGrantCronHandler struct {
	// contains filtered or unexported fields
}

func NewCreditGrantCronHandler added in v1.0.18

func NewCreditGrantCronHandler(creditGrantService service.CreditGrantService, log *logger.Logger) *CreditGrantCronHandler

func (*CreditGrantCronHandler) ProcessScheduledCreditGrantApplications added in v1.0.18

func (h *CreditGrantCronHandler) ProcessScheduledCreditGrantApplications(c *gin.Context)

type InvoiceHandler added in v1.0.29

type InvoiceHandler struct {
	// contains filtered or unexported fields
}

InvoiceHandler handles invoice related cron jobs

func NewInvoiceHandler added in v1.0.29

func NewInvoiceHandler(
	invoiceService service.InvoiceService,
	subscriptionService service.SubscriptionService,
	connectionService service.ConnectionService,
	tenantService service.TenantService,
	environmentService service.EnvironmentService,
	integrationFactory *integration.Factory,
	logger *logger.Logger,
) *InvoiceHandler

NewInvoiceHandler creates a new invoice handler

func (*InvoiceHandler) VoidOldPendingInvoices added in v1.0.29

func (h *InvoiceHandler) VoidOldPendingInvoices(c *gin.Context)

VoidOldPendingInvoices processes incomplete subscriptions and voids their old pending invoices

type SubscriptionHandler

type SubscriptionHandler struct {
	// contains filtered or unexported fields
}

SubscriptionHandler handles subscription related cron jobs

func NewSubscriptionHandler

func NewSubscriptionHandler(
	subscriptionService service.SubscriptionService,
	logger *logger.Logger,
) *SubscriptionHandler

NewSubscriptionHandler creates a new subscription handler

func (*SubscriptionHandler) ProcessAutoCancellationSubscriptions added in v1.0.25

func (h *SubscriptionHandler) ProcessAutoCancellationSubscriptions(c *gin.Context)

ProcessAutoCancellationSubscriptions processes subscriptions that are eligible for auto-cancellation We need to get all unpaid invoices and check if the grace period has expired

func (*SubscriptionHandler) ProcessSubscriptionRenewalDueAlerts added in v1.0.25

func (h *SubscriptionHandler) ProcessSubscriptionRenewalDueAlerts(c *gin.Context)

ProcessSubscriptionRenewalDueAlerts processes subscriptions that are due for renewal in 24 hours and sends webhook notifications

func (*SubscriptionHandler) UpdateBillingPeriods

func (h *SubscriptionHandler) UpdateBillingPeriods(c *gin.Context)

type TenantEnvironmentPair added in v1.0.29

type TenantEnvironmentPair struct {
	TenantID      string `json:"tenant_id" binding:"required"`
	EnvironmentID string `json:"environment_id" binding:"required"`
}

TenantEnvironmentPair represents a tenant and environment pair to process

type VoidOldPendingInvoicesRequest added in v1.0.29

type VoidOldPendingInvoicesRequest struct {
	// targets is an optional array of tenant-environment pairs to process. If empty, all tenants and environments are processed.
	Targets []TenantEnvironmentPair `json:"targets,omitempty"`
}

VoidOldPendingInvoicesRequest represents the request payload for the void old pending invoices cron job

type WalletCronHandler

type WalletCronHandler struct {
	// contains filtered or unexported fields
}

func NewWalletCronHandler

func NewWalletCronHandler(logger *logger.Logger,
	walletService service.WalletService,
	tenantService service.TenantService,
	environmentService service.EnvironmentService,
	featureService service.FeatureService,
	alertLogsService service.AlertLogsService,
) *WalletCronHandler

func (*WalletCronHandler) CheckAlerts added in v1.0.21

func (h *WalletCronHandler) CheckAlerts(c *gin.Context)

CheckAlerts checks wallet balances and triggers alerts based on thresholds

func (*WalletCronHandler) ExpireCredits

func (h *WalletCronHandler) ExpireCredits(c *gin.Context)

ExpireCredits finds and expires credits that have passed their expiry date

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL