尚未偵測到更新。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).