尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Weather forecasting microservice, used to enrich beehive context data
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Backend proxy service that makes request to third party weather service (open-meteo.com) and reports results in graphql format for frontend to consume.
Responsible for this view:
flowchart LR
web-app("<a href='https://github.com/Gratheon/web-app'>web-app</a>") --> graphql-router
graphql-router --"poll schema"--> graphql-schema-registry
graphql-router --> weather("<a href='https://github.com/Gratheon/weather'>weather</a>")
weather --"register schema"-->graphql-schema-registry
weather(lat: String!, lng: String!): JSONGet current weather forecast from Open-Meteo API.
weatherEstonia(lat: String!, lng: String!): JSONGet weather forecast specifically for Estonia from ilmateenistus.ee.
historicalWeather(lat: String!, lng: String!, startDate: String!, endDate: String!, stepHours: Int = 1): HistoricalWeatherDataGet historical weather data from Open-Meteo archive API.
stepHours can be used to downsample hourly data server-side (for example, stepHours: 3 returns every third hour) to reduce response size for long time ranges.
historicalWeatherCompact(lat: String!, lng: String!, startDate: String!, endDate: String!, stepHours: Int = 1): HistoricalWeatherCompactDataCompact variant of historical weather where each metric is returned as:
startTimestepHoursvalues: [Float]This avoids repeating time/value object keys for every point and is more efficient for large time ranges.
Example Query:
query {
historicalWeather(
lat: "59.43",
lng: "24.75",
startDate: "2024-01-01",
endDate: "2024-01-31"
) {
solarRadiation {
diffuse_radiation { time value }
direct_radiation { time value }
}
wind {
wind_speed_10m { time value }
wind_gusts_10m { time value }
}
cloudCover {
cloud_cover_low { time value }
cloud_cover_mid { time value }
cloud_cover_high { time value }
}
rain {
rain { time value }
}
pollen {
ragweed_pollen { time value }
alder_pollen { time value }
birch_pollen { time value }
grass_pollen { time value }
mugwort_pollen { time value }
olive_pollen { time value }
}
pollution {
pm2_5 { time value }
pm10 { time value }
}
}
}
just start
go test ./...
historicalWeather responses can be cached in Redis to speed up repeated insights/time-view graph loads (for example, 90-day history).
Environment variables:
REDIS_HOST (empty = cache disabled)REDIS_PORT (default: 6379)REDIS_PASSWORD (default: empty)REDIS_DB (default: 0)HISTORICAL_WEATHER_CACHE_TTL_SECONDS (default: 1800)This project is dual-licensed:
AGPL v3 - For open source use:
Commercial License - For enterprise customers who need:
If you'd like to contribute, please see our Contributing Guide and sign our Contributor License Agreement (CLA).