Versions in this module Expand all Collapse all v0 v0.1.1 Jun 11, 2026 v0.1.0 Jun 10, 2026 Changes in this version + func CheckServerVersion(ctx context.Context, c *Client, w io.Writer) + func FetchAll[T any](ctx context.Context, limit int, ...) ([]T, error) + func IsTerminalScanStatus(status string) bool + func IsTerminalStatus(status string) bool + type APIError struct + Message string + Raw []byte + StatusCode int + Validation []ValidationItem + func DecodeError(resp *http.Response) *APIError + func (e *APIError) Error() string + type ActiveAlertItem struct + CostImpact float64 + Description string + ID string + Project string + Provider string + Rule string + Severity string + Status string + TriggeredAt string + type AlertAckResponse struct + Count int + IDs []string + Raw map[string]any + type AlertListResponse struct + Alerts []AlertResponse + Count int + HasNext bool + HasPrev bool + Page int + PageSize int + Total int + type AlertQuery struct + Limit int + Page int + Severity string + Status string + type AlertResponse struct + CostImpact float64 + Description string + FirstSeen string + ID string + IsAcknowledged bool + LastSeen string + Project string + Provider string + Raw map[string]any + Rule string + Severity string + Status string + TriggeredAt string + type AlertStats struct + Ack int + BySeverity map[string]int + Firing int + Resolved int + type AlertStatsResponse struct + Active int + Raw map[string]any + Total int + type AuthProviderConfig struct + ClientID string + ClientSecret string + Extra map[string]any + Issuer string + type AuthProviderInput struct + Config AuthProviderConfig + Enabled bool + Kind string + Name string + type AuthProviderResponse struct + Config map[string]any + CreatedAt string + CreatedBy string + Enabled bool + ID string + Kind string + LastTestAt string + LastTestOK *bool + Name string + UpdatedAt string + type AzureRegisterRequest struct + ClientID string + ClientSecret string + SubscriptionID string + TenantID string + type BreakdownItem struct + Provider string + SKU string + Total float64 + type CLIConfigCreate struct + CloudConfig string + Provider string + Region string + ServiceCategory string + type CLIConfigsListResponse struct + Data []CloudConfigResponse + Page int + Total int + type Client struct + func New(server string, token TokenProvider, opts ...Option) *Client + func (c *Client) AckWastageFinding(ctx context.Context, findingID string) (map[string]any, error) + func (c *Client) AcknowledgeAlert(ctx context.Context, alertID string) (*AlertAckResponse, error) + func (c *Client) AcknowledgeAllAlerts(ctx context.Context) (*AlertAckResponse, error) + func (c *Client) AdminCreateProvider(ctx context.Context, req AuthProviderInput) (*AuthProviderResponse, error) + func (c *Client) AdminDeleteProvider(ctx context.Context, id string) (*map[string]string, error) + func (c *Client) AdminGetProvider(ctx context.Context, id string) (*AuthProviderResponse, error) + func (c *Client) AdminListProviders(ctx context.Context) ([]AuthProviderResponse, error) + func (c *Client) AdminTestProvider(ctx context.Context, id string) (*map[string]any, error) + func (c *Client) AdminUpdateProvider(ctx context.Context, id string, req AuthProviderInput) (*AuthProviderResponse, error) + func (c *Client) CancelRun(ctx context.Context, runID string) (map[string]any, error) + func (c *Client) CreateConfig(ctx context.Context, req CloudConfigCreate) (*CloudConfigResponse, error) + func (c *Client) CreateProject(ctx context.Context, req ProjectCreate) (*ProjectResponse, error) + func (c *Client) DBStats(ctx context.Context) (map[string]any, error) + func (c *Client) DeleteConfig(ctx context.Context, id string) error + func (c *Client) DeleteExtractor(ctx context.Context, id string) error + func (c *Client) DeleteProject(ctx context.Context, slug string) error + func (c *Client) Do(ctx context.Context, method, path string, body io.Reader, ...) (*http.Response, error) + func (c *Client) ExportCosts(ctx context.Context, q costQuery, w io.Writer) (int64, error) + func (c *Client) GetActiveAlerts(ctx context.Context, limit int) ([]ActiveAlertItem, error) + func (c *Client) GetAlertStats(ctx context.Context) (*AlertStatsResponse, error) + func (c *Client) GetConfig(ctx context.Context, id string) (*CloudConfigResponse, error) + func (c *Client) GetCostBreakdown(ctx context.Context, q costQuery) ([]BreakdownItem, error) + func (c *Client) GetCostSummary(ctx context.Context, q costQuery) (*CostSummaryResponse, error) + func (c *Client) GetCostTotals(ctx context.Context, q costQuery) (*CostTotalsResponse, error) + func (c *Client) GetCostsBySKU(ctx context.Context, q costQuery) ([]SKUItem, error) + func (c *Client) GetDailyCosts(ctx context.Context, q costQuery) ([]DailyEntry, error) + func (c *Client) GetDashboardStats(ctx context.Context, window string) (*DashboardStats, error) + func (c *Client) GetExtractor(ctx context.Context, id string) (*ExtractorResponse, error) + func (c *Client) GetJSON(ctx context.Context, path string, out any) error + func (c *Client) GetProject(ctx context.Context, slug, window string) (*ProjectResponse, error) + func (c *Client) GetRun(ctx context.Context, runID string) (*RunResponse, error) + func (c *Client) GetRunLogs(ctx context.Context, runID string) (*LogsResponse, error) + func (c *Client) GetSKUs(ctx context.Context, provider string) ([]string, error) + func (c *Client) GetWastageFinding(ctx context.Context, findingID string) (*WastageFinding, error) + func (c *Client) GetWastageSummary(ctx context.Context) ([]WastageSummaryItem, error) + func (c *Client) GitHubCallback(ctx context.Context, code string) (*GitHubCallbackResponse, error) + func (c *Client) GitHubRedirectURL(ctx context.Context) (*GitHubRedirectResponse, error) + func (c *Client) Health(ctx context.Context) (*HealthInfo, error) + func (c *Client) Healthz(ctx context.Context) (*HealthzInfo, error) + func (c *Client) IgnoreWastageFinding(ctx context.Context, findingID, reason string) (map[string]any, error) + func (c *Client) ListActiveAlerts(ctx context.Context) (*AlertListResponse, error) + func (c *Client) ListAlerts(ctx context.Context, q AlertQuery) (*AlertListResponse, error) + func (c *Client) ListConfigs(ctx context.Context) ([]CloudConfigResponse, error) + func (c *Client) ListCosts(ctx context.Context, q costQuery) (*CostListResponse, error) + func (c *Client) ListExtractors(ctx context.Context, provider string, limit int) ([]ExtractorResponse, error) + func (c *Client) ListProjects(ctx context.Context, window string) ([]ProjectResponse, error) + func (c *Client) ListRuns(ctx context.Context, extractorID, status string, limit int) ([]RunResponse, error) + func (c *Client) ListWastageFindings(ctx context.Context, q WastageFindingQuery) (*WastageFindingListResponse, error) + func (c *Client) ListWastageRules(ctx context.Context) ([]WastageRule, error) + func (c *Client) ListWastageScans(ctx context.Context, limit int) ([]WastageScan, error) + func (c *Client) Login(ctx context.Context, req LoginRequest) (*LoginResponse, error) + func (c *Client) OIDCCallback(ctx context.Context, req OIDCCallbackRequest) (*OIDCCallbackResponse, error) + func (c *Client) OIDCLogin(ctx context.Context, providerID string) (*OIDCLoginResponse, error) + func (c *Client) OIDCProviders(ctx context.Context) ([]OIDCProviderPublic, error) + func (c *Client) RegisterAzure(ctx context.Context, req AzureRegisterRequest) (*map[string]any, error) + func (c *Client) RegisterExtractor(ctx context.Context, req ExtractorCreate) (*ExtractorResponse, error) + func (c *Client) RegisterGCP(ctx context.Context, req GCPRegisterRequest) (*map[string]any, error) + func (c *Client) ResolveWastageFinding(ctx context.Context, findingID string) (map[string]any, error) + func (c *Client) Server() string + func (c *Client) TestConfig(ctx context.Context, id string) (map[string]any, error) + func (c *Client) TriggerRun(ctx context.Context, req TriggerRequest) (*TriggerResponse, error) + func (c *Client) TriggerWastageScan(ctx context.Context, provider string) (*WastageScanTriggerResponse, error) + func (c *Client) UpdateConfig(ctx context.Context, id string, req CloudConfigUpdate) (*CloudConfigResponse, error) + type CloudConfigCreate struct + Config map[string]any + CredentialType string + Name string + Provider string + type CloudConfigResponse struct + Config map[string]any + CreatedAt string + CredentialType string + Err string + ID string + LastTest string + LastTestAt string + Name string + ProjectID string + Provider string + SubscriptionID string + TenantID string + UpdatedAt string + type CloudConfigUpdate struct + Config map[string]any + CredentialType *string + Name *string + type CostListResponse struct + Costs []CostRecord + HasNext bool + HasPrev bool + Page int + PageSize int + Total int + Totals map[string]float64 + Window string + type CostQuery = costQuery + type CostRecord struct + Date string + Delta float64 + ID string + MTD float64 + Name string + Prev float64 + ProjectID string + Provider string + SKU string + Tags map[string]any + type CostSummaryResponse struct + ByProvider map[string]float64 + ByService map[string]float64 + Raw map[string]any + Total float64 + Window string + type CostTotalsResponse struct + EndDate string + Raw map[string]any + StartDate string + Totals map[string]ProviderTotals + Window string + type DailyEntry struct + Azure float64 + Date string + Extra map[string]float64 + GCP float64 + LLM float64 + Total float64 + type DashboardStats struct + AlertStats AlertStats + Daily []DailyEntry + Raw map[string]any + Totals map[string]float64 + type ExtractorCreate struct + Config map[string]any + ConfigID string + ExtractorType string + Name string + Provider string + Schedule string + type ExtractorListResponse struct + Count int + Data []map[string]any + HasNext bool + HasPrev bool + Page int + PageSize int + Total int + type ExtractorResponse struct + ConfigID string + ConfigName string + Enabled bool + ID string + LastRun string + Name string + Provider string + Raw map[string]any + Schedule string + Status string + type GCPRegisterRequest struct + KeyFileContent string + ProjectID string + type GitHubCallbackRequest struct + Code string + type GitHubCallbackResponse struct + Token string + type GitHubRedirectResponse struct + URL string + type HealthInfo struct + Status string + Version string + type HealthzInfo struct + DB string + Extra map[string]any + Status string + type LogEntry struct + Level string + Message string + Timestamp string + type LoginRequest struct + Password string + Username string + type LoginResponse struct + AccessToken string + Token string + TokenType string + func (r *LoginResponse) AccessTokenValue() string + type LogsResponse struct + Entries []LogEntry + Lines []string + type OIDCCallbackRequest struct + Code string + ProviderID string + State string + type OIDCCallbackResponse struct + Token string + UserID int + Username string + type OIDCLoginRequest struct + ProviderID string + type OIDCLoginResponse struct + AuthorizationURL string + State string + type OIDCProviderPublic struct + Enabled bool + ID string + Issuer string + Name string + type Option func(*Client) + func WithDebug(w io.Writer) Option + func WithHTTPClient(h *http.Client) Option + func WithMaxRetries(n int) Option + func WithUserAgent(ua string) Option + type Page struct + HasNext bool + Items []T + type ProjectCreate struct + Name string + Slug string + type ProjectResponse struct + MTD float64 + Name string + Raw map[string]any + Slug string + type ProviderTotals struct + Delta float64 + MTD float64 + Prev float64 + type RunListResponse struct + Data []map[string]any + HasNext bool + Page int + PageSize int + Total int + type RunResponse struct + CompletedAt string + DurationSecs float64 + Error string + ExtractorID string + ExtractorName string + ID string + Params map[string]any + Provider string + Raw map[string]any + StartedAt string + Status string + type SKUItem struct + SKU string + Total float64 + type TokenProvider func() (string, error) + type TriggerRequest struct + ExtractorID string + Params map[string]any + type TriggerResponse struct + ID string + RunID string + Status string + func (r *TriggerResponse) RunID_() string + type ValidationItem struct + Loc []string + Msg string + Type string + type WastageFinding struct + AccountID string + Category string + DetectedAt string + EstimatedMonthlySavings float64 + FirstSeenAt string + ID string + LastSeenAt string + Provider string + Raw map[string]any + ResourceID string + RuleID string + RuleName string + Severity string + Status string + type WastageFindingListResponse struct + Data []WastageFinding + HasNext bool + HasPrev bool + Limit int + Offset int + Total int + type WastageFindingQuery struct + AccountID string + Limit int + Offset int + Provider string + RuleID string + Severity string + Status string + type WastageRule struct + Category string + Description string + Enabled bool + ID string + Name string + Provider string + Raw map[string]any + Severity string + type WastageScan struct + DurationSecs float64 + FindingCount int + FinishedAt string + ID string + Provider string + Raw map[string]any + ScanID string + StartedAt string + Status string + type WastageScanTriggerResponse struct + ID string + Raw map[string]any + ScanID string + Status string + func (r *WastageScanTriggerResponse) ScanID_() string + type WastageSummaryItem struct + Category string + Count int + EstimatedSavings float64