forecast

package
v1.24.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: Apache-2.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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