A back end API for the Tech Zero hackathon
- Make sure you have Go 1.22.4 or above installed.
- Use
go run *.go
(ormake up
with Make installed) to run the application
- If you have
make
installed, you can usemake lint
to rungolangci-lint run
GET /health
- This is a health check route.
GET /my_response
- Returns some dummy data.
GET /energy
-
Inputs:
from
(URL query parameter, can take a date or ISO8601 time)to
(URL query parameter, can take a date or ISO8601 time)functionId
(URL query parameter, just put whatever you want here)
-
Outputs:
- An object array where each object has the following fields:
timestamp
(an ISO8601 compliant timestamp)carbon_intensity
(an integer representing grams of carbon intensity per kilowatt hour)
- An object array where each object has the following fields: