implement paywall (#161)
* implement core foundation * inject deps * fix incorrect migration * tail migration * use transaction for migration * fix: inject deps for tests * cleanup billing management for admin * upgrade stripe sdk to v85 * set price env variables * cleanup billing management * allow multiple dev windows * fix: settings scroll * feat: show nice video thumbnail in listview * feat: implement freemium restrictions * remove unnecessary comments * refactor * docs * format * tweak network settings better hierarchy
This commit was merged in pull request #161.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package billing
|
||||
|
||||
import "time"
|
||||
|
||||
// FreemiumDailyLimit is the per-network daily cap on usage,
|
||||
// agnostic of the units that this refer to. This is only relevant for the "free" plan.
|
||||
const FreemiumDailyLimit = 50
|
||||
|
||||
// Usage describes a network's current freemium quota state for today.
|
||||
type Usage struct {
|
||||
Plan Plan `json:"plan"`
|
||||
Used int `json:"used"`
|
||||
Limit *int `json:"limit"` // nil = unlimited (pro)
|
||||
ResetAt time.Time `json:"reset_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user