Help us shape the future of Go! Take the 2026 Go Developer Survey

plan

package
v0.4.72 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PlanStepKey contextKey = "planStep"

Variables

This section is empty.

Functions

func GetPlanStep added in v0.2.112

func GetPlanStep(ctx context.Context) string

Types

type FlyPostgresPlan

type FlyPostgresPlan struct {
	AppName    string `json:"app_name"`
	VmSize     string `json:"vm_size"`
	VmRam      int    `json:"vm_ram"`
	Nodes      int    `json:"nodes"`
	DiskSizeGB int    `json:"disk_size_gb"`
	AutoStop   bool   `json:"auto_stop"`
	Price      int    `json:"price"`
}

func (*FlyPostgresPlan) Guest

func (p *FlyPostgresPlan) Guest() *fly.MachineGuest

type GitHubActionsPlan added in v0.2.73

type GitHubActionsPlan struct {
	Deploy bool `json:"deploy"`
	Review bool `json:"review"`
}

type LaunchPlan

type LaunchPlan struct {
	AppName string `json:"name"`
	OrgSlug string `json:"org"`

	RegionCode       string `json:"region"`
	HighAvailability bool   `json:"ha"`

	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	CPUKind string `json:"vm_cpu_kind,omitempty"`
	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	CPUs int `json:"vm_cpus,omitempty"`
	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	MemoryMB int `json:"vm_memory,omitempty"`
	// Deprecated: The UI currently returns this instead of Compute, but new development should use Compute.
	VmSize string `json:"vm_size,omitempty"`

	// In the future, we'll use this over CPUKind, CPUs, MemoryMB, and VmSize.
	// As of writing this, however, the UI does not return this field.
	Compute []*appconfig.Compute `json:"compute"`

	HttpServicePort             int  `json:"http_service_port,omitempty"`
	HttpServicePortSetByScanner bool `json:"http_service_port_set_by_scanner,omitempty"`

	Postgres      PostgresPlan      `json:"postgres"`
	Redis         RedisPlan         `json:"redis"`
	GitHubActions GitHubActionsPlan `json:"github_actions"`
	Sentry        bool              `json:"sentry"`
	ObjectStorage ObjectStoragePlan `json:"object_storage"`

	ScannerFamily string          `json:"scanner_family"`
	FlyctlVersion version.Version `json:"flyctl_version"`

	Runtime RuntimeStruct `json:"runtime"`
}

func (*LaunchPlan) Guest

func (p *LaunchPlan) Guest() *fly.MachineGuest

Guest returns the guest described by the *raw* guest fields in a Plan. When the UI starts returning Compute, this will be deprecated.

type ManagedPostgresPlan added in v0.3.111

type ManagedPostgresPlan struct {
	DbName    string `json:"db_name"`
	Region    string `json:"region"`
	Plan      string `json:"plan"`
	DiskSize  int    `json:"disk_size"`
	ClusterID string `json:"cluster_id,omitempty"`
}

func (*ManagedPostgresPlan) GetDbName added in v0.3.111

func (p *ManagedPostgresPlan) GetDbName(plan *LaunchPlan) string

func (*ManagedPostgresPlan) GetRegion added in v0.3.111

func (p *ManagedPostgresPlan) GetRegion(plan *LaunchPlan) string

type ObjectStoragePlan added in v0.2.43

type ObjectStoragePlan struct {
	TigrisObjectStorage *TigrisObjectStoragePlan `json:"tigris_object_storage"`
}

func DefaultObjectStorage added in v0.2.43

func DefaultObjectStorage(plan *LaunchPlan) ObjectStoragePlan

func (*ObjectStoragePlan) Provider added in v0.2.43

func (p *ObjectStoragePlan) Provider() any

type PostgresPlan

type PostgresPlan struct {
	FlyPostgres     *FlyPostgresPlan     `json:"fly_postgres"`
	ManagedPostgres *ManagedPostgresPlan `json:"managed_postgres"`
}

func DefaultPostgres

func DefaultPostgres(ctx context.Context, plan *LaunchPlan, mpgEnabled bool) (PostgresPlan, error)

DefaultPostgres returns the default postgres configuration, with support for forcing postgres type and interactive region selection

func (*PostgresPlan) Provider

func (p *PostgresPlan) Provider() any

type RedisPlan

type RedisPlan struct {
	UpstashRedis *UpstashRedisPlan `json:"upstash_redis"`
}

func DefaultRedis

func DefaultRedis(plan *LaunchPlan) RedisPlan

func (*RedisPlan) Provider

func (p *RedisPlan) Provider() any

type RuntimeStruct added in v0.2.112

type RuntimeStruct struct {
	Language          string `json:"language"`
	Version           string `json:"version"`
	NoInstallRequired bool   `json:"no_install_required"`
}

type TigrisObjectStoragePlan added in v0.2.43

type TigrisObjectStoragePlan struct {
	Name              string `json:"name"`
	Public            bool   `json:"public"`
	Accelerate        bool   `json:"accelerate"`
	WebsiteDomainName string `json:"website_domain_name"`
}

type UpstashRedisPlan

type UpstashRedisPlan struct {
	Eviction     bool     `json:"eviction"`
	ReadReplicas []string `json:"read_replicas"`
}

Jump to

Keyboard shortcuts

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