services

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2025 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ThemeLicenseService

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

ThemeLicenseService handles theme license operations

func NewThemeLicenseService

func NewThemeLicenseService(db *database.DB, polarClient *polar.Client) *ThemeLicenseService

NewThemeLicenseService creates a new theme license service

func (*ThemeLicenseService) DeleteLicense

func (s *ThemeLicenseService) DeleteLicense(ctx context.Context, licenseKey string) error

DeleteLicense removes a license from the database

func (*ThemeLicenseService) GetAllLicenses

func (s *ThemeLicenseService) GetAllLicenses(ctx context.Context) ([]*models.ThemeLicense, error)

GetAllLicenses retrieves all theme licenses

func (*ThemeLicenseService) GetLicenseByKey

func (s *ThemeLicenseService) GetLicenseByKey(ctx context.Context, licenseKey string) (*models.ThemeLicense, error)

GetLicenseByKey retrieves a license by its key

func (*ThemeLicenseService) HasPremiumAccess

func (s *ThemeLicenseService) HasPremiumAccess(ctx context.Context) (bool, error)

HasPremiumAccess checks if the user has premium access

func (*ThemeLicenseService) RefreshAllLicenses

func (s *ThemeLicenseService) RefreshAllLicenses(ctx context.Context) error

RefreshAllLicenses validates all stored licenses against Polar API

func (*ThemeLicenseService) ValidateAndStoreLicense

func (s *ThemeLicenseService) ValidateAndStoreLicense(ctx context.Context, licenseKey string) (*models.ThemeLicense, error)

ValidateAndStoreLicense validates a license key and stores it if valid

Jump to

Keyboard shortcuts

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