drift

package
v0.4.5-rc2 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package drift provides types and helpers for cloud drifts.

Index

Constants

View Source
const (
	// ErrInvalidStatus represents an invalid drift status error.
	ErrInvalidStatus errors.Kind = "invalid drift status"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Status

type Status uint8

Status of a drift.

const (
	OK      Status = 1 << iota // OK status is used when the stack is not drifted.
	Unknown                    // Unknown indicates the drift detection was not executed yet.
	Drifted                    // Drifted status indicates the stack is drifted.
	Failed                     // Failed status indicates the drift detection of the stack failed.

)

func NewStatus

func NewStatus(str string) (Status, error)

NewStatus creates a new stack drift status from a string.

func (Status) MarshalJSON

func (s Status) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaller interface.

func (Status) String

func (s Status) String() string

String representation of the status.

func (*Status) UnmarshalJSON

func (s *Status) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals drift status from JSONs.

func (Status) Validate

func (s Status) Validate() error

Validate the status.

Jump to

Keyboard shortcuts

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