Documentation
¶
Index ¶
- type CostAlert
- type CostIntelligence
- func (c *CostIntelligence) ExportCSV() string
- func (c *CostIntelligence) Forecast(dailyRate float64) *SpendForecast
- func (c *CostIntelligence) GetAnomalies() []CostAlert
- func (c *CostIntelligence) GetBudgetStatus(budgetUSD, spentUSD float64) (bool, float64, string)
- func (c *CostIntelligence) GetTags() []*CostTag
- func (c *CostIntelligence) RecordCost(tag, source string, usd float64)
- type CostTag
- type SpendForecast
- type WeeklyDigest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CostIntelligence ¶
type CostIntelligence struct {
// contains filtered or unexported fields
}
func NewCostIntelligence ¶
func NewCostIntelligence() *CostIntelligence
func (*CostIntelligence) ExportCSV ¶
func (c *CostIntelligence) ExportCSV() string
func (*CostIntelligence) Forecast ¶
func (c *CostIntelligence) Forecast(dailyRate float64) *SpendForecast
func (*CostIntelligence) GetAnomalies ¶
func (c *CostIntelligence) GetAnomalies() []CostAlert
func (*CostIntelligence) GetBudgetStatus ¶
func (c *CostIntelligence) GetBudgetStatus(budgetUSD, spentUSD float64) (bool, float64, string)
func (*CostIntelligence) GetTags ¶
func (c *CostIntelligence) GetTags() []*CostTag
func (*CostIntelligence) RecordCost ¶
func (c *CostIntelligence) RecordCost(tag, source string, usd float64)
type SpendForecast ¶
type WeeklyDigest ¶
type WeeklyDigest struct {
WeekStart time.Time `json:"week_start"`
WeekEnd time.Time `json:"week_end"`
TotalCost float64 `json:"total_cost"`
TotalTokens int64 `json:"total_tokens"`
TopModel string `json:"top_model"`
TopCommand string `json:"top_command"`
SavingsPct float64 `json:"savings_pct"`
Recommendations []string `json:"recommendations"`
}
func GenerateWeeklyDigest ¶
func GenerateWeeklyDigest(costs map[string]float64, tokens int64) *WeeklyDigest
Click to show internal directories.
Click to hide internal directories.