premium

package
v0.0.16-custom-3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 License: MIT Imports: 0 Imported by: 0

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",
	"Platinum",
	"SelfHost",
}

Functions

func IsExpired

func IsExpired(tier Tier, days int) bool

Types

type PremiumRecord

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

type Tier

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

Jump to

Keyboard shortcuts

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