Versions in this module Expand all Collapse all v1 v1.0.1 Apr 27, 2026 v1.0.0 Apr 27, 2026 Changes in this version + var ErrorCodeAPIKeyInvalid = "invalid_api_key" + var ErrorCodeExceededQuota = "above_quota" + func ReportCLIError(ctx *settings.Session, cliErr error, replacePath bool) error + type APIClient struct + func (c *APIClient) AddAuthHeaders(req *http.Request) + func (c *APIClient) AddDefaultHeaders(req *http.Request) + func (c *APIClient) DoQueries(queries []GraphQLQuery) ([]gjson.Result, error) + type APIError struct + Code int + ErrorCode string + Msg string + func (e *APIError) Error() string + type APIErrorResponse struct + Error string + ErrorCode string + type ActualCostComponent struct + Currency string + Description string + MonthlyCost string + MonthlyQuantity string + Price string + Unit string + UsageType string + type ActualCostsQueryVariables struct + Address string + Currency string + ProjectWithWorkspace string + RepoURL string + type ActualCostsResult struct + Address string + CostComponents []ActualCostComponent + EndTimestamp time.Time + ResourceID string + StartTimestamp time.Time + type AddRunResponse struct + CloudURL string + CommentMarkdown string + GovernanceFailures render.GovernanceFailures + GovernanceResults []GovernanceResult + PullRequestURL string + RunID string + ShareURL string + type AuthClient struct + Host string + func (a AuthClient) Login(contextVals map[string]interface{}) (string, string, error) + type BatchRequest struct + type CloudResourceIDVariables struct + ProjectWithWorkspace string + RepoURL string + ResourceIDAddresses []ResourceIDAddress + type CreateAPIKeyResponse struct + APIKey string + Error string + type DashboardAPIClient struct + func NewDashboardAPIClient(ctx *settings.Session) *DashboardAPIClient + func (c *DashboardAPIClient) AddRun(ctx *settings.Session, out render.Report) (AddRunResponse, error) + func (c *DashboardAPIClient) QueryCLISettings() (QueryCLISettingsResponse, error) + func (c *DashboardAPIClient) SavePostedPrComment(ctx *settings.Session, runId, comment string) error + type GovernanceResult struct + Checked int64 + Failures []string + Type string + Unblocked []string + Warnings []string + type GraphQLQuery struct + Query string + Variables map[string]interface{} + type LeveledLogger struct + Logger zerolog.Logger + func (l *LeveledLogger) Debug(msg string, keysAndValues ...interface{}) + func (l *LeveledLogger) Error(msg string, keysAndValues ...interface{}) + func (l *LeveledLogger) Info(msg string, keysAndValues ...interface{}) + func (l *LeveledLogger) Warn(msg string, keysAndValues ...interface{}) + type PolicyAPIClient struct + func NewPolicyAPIClient(ctx *settings.Session) (*PolicyAPIClient, error) + func (c *PolicyAPIClient) UploadPolicyData(project *engine.Workspace, rds, pastRds []*engine.ResourceSpec) error + type PriceQueryKey struct + CostComponent *engine.LineItem + Resource *engine.Estimate + type PriceQueryResult struct + Query GraphQLQuery + Result gjson.Result + type PricingAPIClient struct + EventsDisabled bool + OfflineMode bool + func GetPricingAPIClient(ctx *settings.Session) *PricingAPIClient + func NewPricingAPIClient(ctx *settings.Session) *PricingAPIClient + func (c *PricingAPIClient) AddEvent(name string, env map[string]interface{}) error + func (c *PricingAPIClient) BatchRequests(resources []*engine.Estimate, batchSize int, currency string) []BatchRequest + func (c *PricingAPIClient) FlushCache() error + func (c *PricingAPIClient) PerformRequest(req BatchRequest) ([]PriceQueryResult, error) + type QueryCLISettingsResponse struct + ActualCostsEnabled bool + CloudEnabled bool + PoliciesAPIEnabled bool + TagsAPIEnabled bool + UsageAPIEnabled bool + type ResourceIDAddress struct + Address string + ResourceID string + type TagPropagation struct + Attribute string + From *string + HasRequiredAttributes bool + Tags *[]policy2Tag + To string + type UsageAPIClient struct + Currency string + func NewUsageAPIClient(ctx *settings.Session) *UsageAPIClient + func (c *UsageAPIClient) ListActualCosts(vars ActualCostsQueryVariables) ([]ActualCostsResult, error) + func (c *UsageAPIClient) ListUsageQuantities(vars []*UsageQuantitiesQueryVariables) ([]*engine.ConsumptionProfile, error) + func (c *UsageAPIClient) UploadCloudResourceIDs(vars CloudResourceIDVariables) error + type UsageQuantitiesQueryVariables struct + Address string + ProjectWithWorkspace string + RepoURL string + ResourceType string + UsageKeys []string + UsageParams []engine.ConsumptionParam