normalizers: added a structure for normalizers; refactoring sources -> sources+normalizers is still todo.
This commit is contained in:
20
internal/standards/schema.go
Normal file
20
internal/standards/schema.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package standards
|
||||
|
||||
// Schema strings used by weatherfeeder.
|
||||
//
|
||||
// We standardize on schema matching for normalizers (rather than matching on
|
||||
// source names or kinds) because schema strings are explicit, versionable, and
|
||||
// independent of user configuration.
|
||||
//
|
||||
// Conventions:
|
||||
// - Raw upstream payloads: "raw.<provider>.<thing>.vN"
|
||||
// - Canonical domain events: "weather.<kind>.vN"
|
||||
const (
|
||||
// Raw upstream schemas (emitted by sources).
|
||||
SchemaRawNWSObservationV1 = "raw.nws.observation.v1"
|
||||
SchemaRawOpenMeteoCurrentV1 = "raw.openmeteo.current.v1"
|
||||
SchemaRawOpenWeatherCurrentV1 = "raw.openweather.current.v1"
|
||||
|
||||
// Canonical domain schemas (emitted after normalization).
|
||||
SchemaWeatherObservationV1 = "weather.observation.v1"
|
||||
)
|
||||
Reference in New Issue
Block a user