Refactored the application structure to better separate concerns between files and packages
Some checks failed
ci/woodpecker/push/build-image Pipeline failed

This commit is contained in:
2026-03-20 09:44:53 -05:00
parent 8deb4fd12e
commit bb18bcfb15
41 changed files with 1445 additions and 1086 deletions

View File

@@ -0,0 +1,33 @@
// observations_queries.go contains SQL text for observation reads.
// Layer: adapters/outbound/postgres observations feature.
package postgres
const (
queryLatestObservation = `
SELECT
event_id,
station_id,
station_name,
observed_at,
condition_code,
is_day,
text_description,
temperature_c,
dewpoint_c,
wind_direction_degrees,
wind_speed_kmh,
wind_gust_kmh,
barometric_pressure_pa,
visibility_meters,
relative_humidity_percent,
apparent_temperature_c
FROM observations
ORDER BY observed_at DESC, event_emitted_at DESC
LIMIT 1`
queryObservationPresentWeather = `
SELECT weather_index, raw_text
FROM observation_present_weather
WHERE event_id = $1
ORDER BY weather_index ASC`
)