UNPKG

@cloud-carbon-footprint/core

Version:

The core logic to get cloud usage data and estimate energy and carbon emissions.

20 lines (19 loc) 759 B
import { Cost } from './cost'; import { ICloudService, FootprintEstimate, CloudConstants, CloudConstantsEmissionsFactors } from '.'; export default class Region { id: string; services: ICloudService[]; emissionsFactors: CloudConstantsEmissionsFactors; constants: CloudConstants; constructor(id: string, services: ICloudService[], emissionsFactors: CloudConstantsEmissionsFactors, constants: CloudConstants); getEstimates(startDate: Date, endDate: Date): Promise<{ [service: string]: FootprintEstimate[]; }>; getCosts(startDate: Date, endDate: Date): Promise<RegionCosts>; } export interface RegionEstimates { [service: string]: FootprintEstimate[]; } export interface RegionCosts { [service: string]: Cost[]; }