Documentation
¶
Index ¶
- type DB
- type LicenseRepo
- func (r *LicenseRepo) DeleteLicense(ctx context.Context, licenseKey string) error
- func (r *LicenseRepo) GetAllLicenses(ctx context.Context) ([]*models.ProductLicense, error)
- func (r *LicenseRepo) GetLicenseByKey(ctx context.Context, licenseKey string) (*models.ProductLicense, error)
- func (r *LicenseRepo) HasPremiumAccess(ctx context.Context) (bool, error)
- func (r *LicenseRepo) StoreLicense(ctx context.Context, license *models.ProductLicense) error
- func (r *LicenseRepo) UpdateLicenseActivation(ctx context.Context, license *models.ProductLicense) error
- func (r *LicenseRepo) UpdateLicenseStatus(ctx context.Context, licenseID int, status string) error
- func (r *LicenseRepo) UpdateLicenseValidation(ctx context.Context, license *models.ProductLicense) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LicenseRepo ¶ added in v1.0.0
type LicenseRepo struct {
// contains filtered or unexported fields
}
func NewLicenseRepo ¶ added in v1.0.0
func NewLicenseRepo(db *DB) *LicenseRepo
func (*LicenseRepo) DeleteLicense ¶ added in v1.0.0
func (r *LicenseRepo) DeleteLicense(ctx context.Context, licenseKey string) error
DeleteLicense removes a license from the database
func (*LicenseRepo) GetAllLicenses ¶ added in v1.0.0
func (r *LicenseRepo) GetAllLicenses(ctx context.Context) ([]*models.ProductLicense, error)
GetAllLicenses retrieves all licenses
func (*LicenseRepo) GetLicenseByKey ¶ added in v1.0.0
func (r *LicenseRepo) GetLicenseByKey(ctx context.Context, licenseKey string) (*models.ProductLicense, error)
GetLicenseByKey retrieves a license by its key
func (*LicenseRepo) HasPremiumAccess ¶ added in v1.0.0
func (r *LicenseRepo) HasPremiumAccess(ctx context.Context) (bool, error)
HasPremiumAccess checks if the user has purchased premium access (one-time unlock)
func (*LicenseRepo) StoreLicense ¶ added in v1.0.0
func (r *LicenseRepo) StoreLicense(ctx context.Context, license *models.ProductLicense) error
func (*LicenseRepo) UpdateLicenseActivation ¶ added in v1.0.0
func (r *LicenseRepo) UpdateLicenseActivation(ctx context.Context, license *models.ProductLicense) error
UpdateLicenseActivation updates a license with activation details
func (*LicenseRepo) UpdateLicenseStatus ¶ added in v1.0.0
func (*LicenseRepo) UpdateLicenseValidation ¶ added in v1.0.0
func (r *LicenseRepo) UpdateLicenseValidation(ctx context.Context, license *models.ProductLicense) error
Click to show internal directories.
Click to hide internal directories.