Files
weatherfeeder/internal/model/kind.go
Eric Rakestraw aa4774e0dd weatherfeeder: split the former maximumdirect.net/weatherd project in two.
feedkit now contains a reusable core, while weatherfeeder is a concrete implementation that includes weather-specific functions.
2026-01-13 18:14:21 -06:00

24 lines
567 B
Go

package model
// Kind identifies which payload an Event carries.
type Kind string
const (
KindObservation Kind = "observation"
KindForecast Kind = "forecast"
KindAlert Kind = "alert"
)
// IsKnown returns true if k is one of the kinds supported by this binary.
//
// This is intentionally strict: if you add new kinds later, update this list.
// That keeps validation useful (it catches partially-constructed events).
func (k Kind) IsKnown() bool {
switch k {
case KindObservation, KindForecast, KindAlert:
return true
default:
return false
}
}