runstatus

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package runstatus provides run statuses.

NOTE: placed in separate package from `run` to avoid import cycles.

templ: version: v0.3.906

Index

Constants

This section is empty.

Variables

View Source
var ThemeMappings = map[Status]string{
	Applied:            "success",
	ApplyQueued:        "secondary",
	Applying:           "accent",
	Canceled:           "warning",
	Confirmed:          "info",
	Discarded:          "warning",
	Errored:            "error",
	ForceCanceled:      "warning",
	Pending:            "primary",
	PlanQueued:         "secondary",
	Planned:            "info",
	PlannedAndFinished: "success",
	Planning:           "primary",
}

Functions

func Badge

func Badge(runID resource.TfeID, status Status) templ.Component

func Done added in v0.3.23

func Done(status Status) bool

Done determines whether status is an end state, e.g. applied, discarded, etc.

func Filter added in v0.3.15

func Filter(selected []Status, visible bool) templ.Component

func FilterLabel added in v0.3.20

func FilterLabel(status Status) templ.Component

func Queued added in v0.3.23

func Queued(status Status) bool

Queued determines whether status is a queued state.

Types

type Status

type Status string

Status represents a run state.

const (
	// List all available run statuses supported in OTF.
	Applied            Status = "applied"
	ApplyQueued        Status = "apply_queued"
	Applying           Status = "applying"
	Canceled           Status = "canceled"
	Confirmed          Status = "confirmed"
	Discarded          Status = "discarded"
	Errored            Status = "errored"
	ForceCanceled      Status = "force_canceled"
	Pending            Status = "pending"
	PlanQueued         Status = "plan_queued"
	Planned            Status = "planned"
	PlannedAndFinished Status = "planned_and_finished"
	Planning           Status = "planning"

	// OTF doesn't support cost estimation but go-tfe API tests expect this
	// status so it is included expressly to pass the tests.
	CostEstimated Status = "cost_estimated"
)

func All

func All() []Status

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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