# README
Go API client for Carbon Aware Sustainability
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
Overview
This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.
- API version: 1.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen
Installation
Put the package under your project folder and add the following in import:
import "github.com/Azure/kubernetes-carbon-intensity-exporter/pkg/sdk/client"
Documentation for API Endpoints
All URIs are relative to https://virtserver.swaggerhub.com/Microsoft-hela/carbonaware/1.0.0
Class | Method | HTTP request | Description |
---|---|---|---|
CarbonAwareApi | BatchForecastDataAsync | Post /emissions/forecasts/batch | Given an array of historical forecasts, retrieves the data that contains forecasts metadata, the optimal forecast and a range of forecasts filtered by the attributes [start...end] if provided. |
CarbonAwareApi | GetAverageCarbonIntensity | Get /emissions/average-carbon-intensity | Retrieves the measured carbon intensity data between the time boundaries and calculates the average carbon intensity during that period. |
CarbonAwareApi | GetAverageCarbonIntensityBatch | Post /emissions/average-carbon-intensity/batch | Given an array of request objects, each with their own location and time boundaries, calculate the average carbon intensity for that location and time period and return an array of carbon intensity objects. |
CarbonAwareApi | GetBestEmissionsDataForLocationsByTime | Get /emissions/bylocations/best | Calculate the best emission data by list of locations for a specified time period. |
CarbonAwareApi | GetCurrentForecastData | Get /emissions/forecasts/current | Retrieves the most recent forecasted data and calculates the optimal marginal carbon intensity window. |
CarbonAwareApi | GetEmissionsDataForLocationByTime | Get /emissions/bylocation | Calculate the best emission data by location for a specified time period. |
CarbonAwareApi | GetEmissionsDataForLocationsByTime | Get /emissions/bylocations | Calculate the observed emission data by list of locations for a specified time period. |
LocationsApi | GetAllLocations | Get /locations | Get all locations instances |
Documentation For Models
- CarbonIntensityBatchParametersDto
- CarbonIntensityDto
- EmissionsData
- EmissionsDataDto
- EmissionsForecastBatchParametersDto
- EmissionsForecastDto
- Location
Documentation For Authorization
Endpoints do not require authorization.
Author
# Functions
CacheExpires helper function to determine remaining time before repeating a request.
NewAPIClient creates a new API client.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
ContextAccessToken takes a string oauth2 access token as authentication for the request.
ContextAPIKey takes an APIKey as authentication for the request.
ContextBasicAuth takes BasicAuth as authentication for the request.
ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
Namespace gets the env variable for the current namespace name.
PodName gets the env variable for the current pod.
# Structs
APIClient manages communication with the CarbonAware.WebApi, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null API v1.0 In most cases there should be only one, shared, APIClient.
APIKey provides API key based authentication to a request passed via context using ContextAPIKey.
No description provided by the author
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GenericSwaggerError Provides access to the body, error and model on returned errors.
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author