recommend

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package recommend provides cost optimization recommendations based on estimated resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatTable

func FormatTable(result *Result, noColor bool) string

FormatTable returns a human-readable table of recommendations.

Types

type Recommendation

type Recommendation struct {
	ResourceName   string           `json:"resourceName"`
	ResourceType   string           `json:"resourceType"`
	Category       string           `json:"category"`
	Title          string           `json:"title"`
	Description    string           `json:"description"`
	CurrentCost    *decimal.Decimal `json:"currentMonthlyCost"`
	SuggestedCost  *decimal.Decimal `json:"suggestedMonthlyCost,omitempty"`
	MonthlySavings *decimal.Decimal `json:"monthlySavings,omitempty"`
	SavingsPercent *decimal.Decimal `json:"savingsPercent,omitempty"`
}

Recommendation represents a single cost optimization suggestion.

type Result

type Result struct {
	Recommendations  []Recommendation `json:"recommendations"`
	TotalMonthlyCost *decimal.Decimal `json:"totalMonthlyCost"`
	PotentialSavings *decimal.Decimal `json:"potentialMonthlySavings"`
	SavingsPercent   *decimal.Decimal `json:"savingsPercent"`
}

Result holds all recommendations for a set of projects.

func Analyze

func Analyze(projects []*engine.Workspace) *Result

Analyze examines projects and returns cost optimization recommendations.

Jump to

Keyboard shortcuts

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