Documentation ¶
Index ¶
- Variables
- type Claims
- type FeatureType
- type LicenseService
- func (s *LicenseService) GetSubscription(ctx context.Context) (*apiv1pb.Subscription, error)
- func (s *LicenseService) IsFeatureEnabled(feature FeatureType) bool
- func (s *LicenseService) LoadSubscription(ctx context.Context) (*apiv1pb.Subscription, error)
- func (s *LicenseService) UpdateSubscription(ctx context.Context, licenseKey string) (*apiv1pb.Subscription, error)
- type ValidateResult
Constants ¶
This section is empty.
Variables ¶
View Source
var FeatureMatrix = map[FeatureType][2]bool{ FeatureTypeUnlimitedAccounts: {false, true}, FeatureTypeUnlimitedCollections: {false, true}, FeatureTypeCustomeStyle: {false, true}, }
FeatureMatrix is a matrix of features in [Free, Pro].
Functions ¶
This section is empty.
Types ¶
type FeatureType ¶
type FeatureType string
const ( // FeatureTypeUnlimitedAccounts allows the user to create unlimited accounts. FeatureTypeUnlimitedAccounts FeatureType = "unlimited_accounts" // FeatureTypeUnlimitedAccounts allows the user to create unlimited collections. FeatureTypeUnlimitedCollections FeatureType = "unlimited_collections" // FeatureTypeCustomStyle allows the user to customize the style. FeatureTypeCustomeStyle FeatureType = "custom_style" )
type LicenseService ¶
type LicenseService struct { Profile *profile.Profile Store *store.Store // contains filtered or unexported fields }
func NewLicenseService ¶
func NewLicenseService(profile *profile.Profile, store *store.Store) *LicenseService
NewLicenseService creates a new LicenseService.
func (*LicenseService) GetSubscription ¶
func (s *LicenseService) GetSubscription(ctx context.Context) (*apiv1pb.Subscription, error)
func (*LicenseService) IsFeatureEnabled ¶
func (s *LicenseService) IsFeatureEnabled(feature FeatureType) bool
func (*LicenseService) LoadSubscription ¶
func (s *LicenseService) LoadSubscription(ctx context.Context) (*apiv1pb.Subscription, error)
func (*LicenseService) UpdateSubscription ¶
func (s *LicenseService) UpdateSubscription(ctx context.Context, licenseKey string) (*apiv1pb.Subscription, error)
Click to show internal directories.
Click to hide internal directories.