Files

43 lines
1.0 KiB
Go
Raw Permalink Normal View History

2026-03-17 08:35:16 -05:00
package constants
import "time"
const (
// ObservationWindow defines how far back observations are queried.
ObservationWindow = 30 * time.Minute
// DefaultObservationCount defines the default number of observations returned.
DefaultObservationCount = 5
// MaxObservationCount defines the max observation count accepted from query params.
MaxObservationCount = 100
2026-03-17 08:35:16 -05:00
// ForecastQueryLimit defines the max forecast periods returned.
ForecastQueryLimit = 5
// UnitSystemUS identifies the US customary unit system.
UnitSystemUS = "us"
// UnitSystemMetric identifies the metric unit system.
UnitSystemMetric = "metric"
// DefaultOutputUnitSystem is the API's default output unit system for forecast/current conditions.
DefaultOutputUnitSystem = UnitSystemUS
2026-03-17 08:35:16 -05:00
// DefaultHTTPAddr is the default listen address for the HTTP server.
DefaultHTTPAddr = ":8080"
)
var SupportedTimestampLayouts = []string{
time.RFC3339Nano,
time.RFC3339,
}
const (
TempFahrenheitPrecision = 1
WindMphPrecision = 1
KmhPerMph = 1.609344
MphPerKmh = 1 / KmhPerMph
)