premium

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 0 Imported by: 13

Documentation

Index

Constants

View Source
const NoExpiryCode = -9999 // dumb, but no one would ever have expired premium for 9999 days
View Source
const SubDays = 31 // use 31 because there shouldn't ever be a gap; whenever a renewal happens on the 31st day, that should be valid

Variables

View Source
var TierStrings = []string{
	"Free",
	"Bronze",
	"Silver",
	"Gold",
	"Trial",
	"SelfHost",
}

Functions

func IsExpired added in v0.0.14

func IsExpired(tier Tier, days int) bool

Types

type PremiumRecord added in v0.0.13

type PremiumRecord struct {
	Tier Tier `json:"tier"`
	Days int  `json:"days"`
}

type Tier

type Tier int16
const (
	FreeTier Tier = iota
	BronzeTier
	SilverTier
	GoldTier
	TrialTier
	SelfHostTier
)

Jump to

Keyboard shortcuts

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