cleanup

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityCleanup

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

ActivityCleanup handles periodic cleanup of old user activities

func NewActivityCleanup

func NewActivityCleanup(
	activityService service.UserActivityService,
	interval time.Duration,
	retentionPeriod time.Duration,
) *ActivityCleanup

NewActivityCleanup creates a new activity cleanup service Recommended: Run every 24 hours, keep activities for 90 days

func (*ActivityCleanup) Start

func (ac *ActivityCleanup) Start(ctx context.Context)

Start begins the periodic cleanup process

func (*ActivityCleanup) Stop

func (ac *ActivityCleanup) Stop()

Stop stops the cleanup process

type OrganizationDeletionWorker

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

OrganizationDeletionWorker handles background tasks for organization deletion

func NewOrganizationDeletionWorker

func NewOrganizationDeletionWorker(
	orgRepo interface {
		ListScheduledForDeletion(ctx context.Context, before time.Time) ([]interface{}, error)
		HardDelete(ctx context.Context, orgID uint) error
	},
	logger interface {
		Info(msg string, args ...interface{})
		Error(msg string, args ...interface{})
	},
	interval time.Duration,
) *OrganizationDeletionWorker

NewOrganizationDeletionWorker creates a new organization deletion worker

func (*OrganizationDeletionWorker) Run

Run starts the organization deletion worker

type SubscriptionWorker

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

SubscriptionWorker handles background tasks for subscription lifecycle management

func NewSubscriptionWorker

func NewSubscriptionWorker(
	subService service.SubscriptionService,
	logger interface {
		Info(msg string, args ...interface{})
		Error(msg string, args ...interface{})
	},
	interval time.Duration,
) *SubscriptionWorker

NewSubscriptionWorker creates a new subscription worker

func (*SubscriptionWorker) Run

func (w *SubscriptionWorker) Run(ctx context.Context)

Run starts the subscription worker

type TokenCleanup

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

TokenCleanup handles periodic cleanup of expired tokens

func NewTokenCleanup

func NewTokenCleanup(tokenRepo repository.TokenRepository, interval time.Duration) *TokenCleanup

NewTokenCleanup creates a new token cleanup service

func (*TokenCleanup) Start

func (tc *TokenCleanup) Start(ctx context.Context)

Start begins the periodic cleanup process

func (*TokenCleanup) Stop

func (tc *TokenCleanup) Stop()

Stop stops the cleanup process

Jump to

Keyboard shortcuts

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