preview

package
v0.5.0-rc4 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package preview contains functionality for the preview feature in Terramate Cloud.

Index

Constants

View Source
const ErrInvalidStackStatus = errors.Kind("invalid stack status")

ErrInvalidStackStatus represents an invalid stack status

Variables

This section is empty.

Functions

This section is empty.

Types

type StackStatus

type StackStatus string

StackStatus is the status of a stack in a preview run

const (
	// StackStatusAffected is the status for a stack that is affected in a PR
	StackStatusAffected StackStatus = "affected"
	// StackStatusPending is the status for a stack that is selected in a preview run
	StackStatusPending StackStatus = "pending"
	// StackStatusRunning is the status for a stack that is currently running in a preview run
	StackStatusRunning StackStatus = "running"
	// StackStatusUnchanged is the status for a stack that has no changes in a preview run (successful exit code 0)
	StackStatusUnchanged StackStatus = "unchanged"
	// StackStatusChanged is the status for a stack that has changes in a preview run (successful exit code 2)
	StackStatusChanged StackStatus = "changed"
	// StackStatusCanceled is the status for a stack that has been canceled in a preview run
	StackStatusCanceled StackStatus = "canceled"
	// StackStatusFailed is the status for a stack that has failed in a preview run (non-successful exit code)
	StackStatusFailed StackStatus = "failed"
)

func DerivePreviewStatus

func DerivePreviewStatus(exitCode int) StackStatus

DerivePreviewStatus derives the preview status from the exit code of a preview command

func (StackStatus) String

func (p StackStatus) String() string

func (StackStatus) Validate

func (p StackStatus) Validate() error

Validate validates the stack status

Jump to

Keyboard shortcuts

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