plan

package
v0.51.27 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Free       = "free"
	Starter    = "starter"
	Pro        = "pro"
	Enterprise = "enterprise"
)

Variables

View Source
var All = plans

All exposes plans as a map for backward-compatible iteration (admin dropdowns).

Functions

This section is empty.

Types

type Feature added in v0.51.11

type Feature struct {
	ID     string   // HTML anchor id
	Label  string   // first column text
	Values []string // one value per plan, in display order
	Span   bool     // if true, single value spans all columns
}

Feature represents one row in the plans comparison table.

func DisplayFeatures added in v0.51.11

func DisplayFeatures() []Feature

DisplayFeatures returns the feature comparison rows for the plans table.

type Limits

type Limits = Plan

Limits is an alias for backward-compatible use in admin handlers.

type Plan added in v0.51.11

type Plan struct {
	// Logic fields — used by backend code for limits/gating.
	Name               string
	MaxRepos           int
	MaxEventsPerWeek   int
	MaxDataRangeMonths int
	AILevel            int
	PDFExport          bool
	CSVExport          bool

	// Display fields — used only by the plans comparison table.
	DisplayName       string
	PriceLabel        string
	ReposLabel        string
	PrivateReposLabel string
	EventsLabel       string
	RetentionLabel    string
	PDFExportLabel    string
	CSVExportLabel    string
	AILabel           string
	ReputationLabel   string
	APILabel          string
	ImportLabel       string
	DedicatedLabel    string
}

Plan holds both logic fields (used by backend) and display fields (used by UI).

func DisplayPlans added in v0.51.11

func DisplayPlans() []Plan

DisplayPlans returns plans in display order for the comparison table.

func FreeLimits

func FreeLimits() Plan

FreeLimits returns the free plan.

func Get

func Get(name string) (Plan, bool)

Get returns the plan for a name and whether it exists.

func (Plan) FormatMaxEvents added in v0.51.11

func (p Plan) FormatMaxEvents() string

FormatMaxEvents returns a human-readable string for max events/week (0 = unlimited).

func (Plan) FormatMaxRepos added in v0.51.11

func (p Plan) FormatMaxRepos() string

FormatMaxRepos returns a human-readable string for max repos (0 = unlimited).

Jump to

Keyboard shortcuts

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