forecast

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ignore []string

Which checks to ignore (--ignore)

Functions

This section is empty.

Types

type Check

type Check struct {
	Pass    bool
	Code    string
	Message string
}

Check is a specific check with a code that can be suppressed

func (*Check) String

func (c *Check) String() string

type Env

type Env struct {
	Partition string
	Region    string
	Account   string
}

type Forecast

type Forecast struct {
	TypeName  string
	LogicalId string
	Passed    []Check
	Failed    []Check
	Ignore    []string
}

Forecast represents predictions for resources in the template

func MakeForecast

func MakeForecast(input *PredictionInput) Forecast

func (*Forecast) Add

func (f *Forecast) Add(code string, passed bool, message string, lineNumber int)

Add adds a pass or fail message, formatting it to include the type name and logical id

func (*Forecast) Append

func (f *Forecast) Append(forecast Forecast)

func (*Forecast) GetNumChecked

func (f *Forecast) GetNumChecked() int

func (*Forecast) GetNumFailed

func (f *Forecast) GetNumFailed() int

func (*Forecast) GetNumPassed

func (f *Forecast) GetNumPassed() int

type ForecastPlugin

type ForecastPlugin interface {
	// GetForecasters must be implemented by plugins to return a
	// map of the prediction functions. The key is the resource type name.
	GetForecasters() map[string]func(input PredictionInput) Forecast
}

type PredictionInput

type PredictionInput struct {
	Source      cft.Template
	StackName   string
	Resource    *yaml.Node
	LogicalId   string
	StackExists bool
	Stack       types.Stack
	TypeName    string
	Dc          *deployconfig.DeployConfig
	Env         Env
	RoleArn     string
	Ignore      []string
}

PredictionInput is the input to forecast prediction functions

func (*PredictionInput) GetPropertyNode

func (input *PredictionInput) GetPropertyNode(name string) *yaml.Node

GetPropertyNode returns the node for the given property name

Jump to

Keyboard shortcuts

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