planchange

package
v1.13.1 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package planchange holds the logic shared by the "application upgrade" and "application downgrade" commands. Both commands change the current application's self-serve plan and currently behave identically, so the fetch / billing-check / terms / change flow lives here once.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts *Options) error

Run executes the shared plan-change flow.

Types

type Direction

type Direction int

Direction selects whether the flow offers higher-tier (upgrade) or lower-tier (downgrade) plans.

const (
	DirectionUpgrade Direction = iota
	DirectionDowngrade
)

type Options

type Options struct {
	IO     *iostreams.IOStreams
	Config config.IConfig

	Direction   Direction // upgrade or downgrade
	Plan        string    // --plan (optional): target plan, e.g. "free", "grow", "grow-plus"
	DryRun      bool      // --dry-run: preview without calling the API
	AcceptTerms bool      // --accept-terms: accept ToS in non-interactive mode

	PrintFlags *cmdutil.PrintFlags

	NewDashboardClient func(clientID string) *dashboard.Client
	Browser            func(string) error
}

Options carries everything the shared plan-change flow needs. The upgrade and downgrade commands populate it the same way.

Jump to

Keyboard shortcuts

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