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 Layer ¶
type Layer string
Layer represents a cloud sync layer e.g. "dev", "staging", "prod" etc.
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
Click to show internal directories.
Click to hide internal directories.