Versions in this module Expand all Collapse all v1 v1.2.3 Jun 20, 2026 v1.2.2 Jun 8, 2026 v1.2.1 Jun 5, 2026 v1.2.0 Jun 4, 2026 Changes in this version + type Event struct + Actual *float64 + Country string + Estimate *float64 + ID int64 + Impact ImpactLevel + Name string + Previous *float64 + Source string + Time time.Time + Unit string + func (ev Event) GenerateDocID() string + func (ev Event) NearEqual(other Event) bool + func (ev Event) String() string + type EventRepository interface + Close func() error + GetByPeriod func(ctx context.Context, period *Period) ([]Event, error) + Store func(ctx context.Context, event *Event) error + type EventServer struct + func NewEventServer(repo EventRepository, tok string) *EventServer + func (s *EventServer) ServeHTTP(w http.ResponseWriter, r *http.Request) + type FirestoreEventRepository struct + func NewFirestoreEventRepository(ctx context.Context, projectID string) (*FirestoreEventRepository, error) + func (r *FirestoreEventRepository) Close() error + func (r *FirestoreEventRepository) GetByPeriod(ctx context.Context, period *Period) ([]Event, error) + func (r *FirestoreEventRepository) Store(ctx context.Context, event *Event) error + type ImpactLevel int + const ImpactHigh + const ImpactLow + const ImpactMedium + func (i ImpactLevel) String() string + type Period struct + From time.Time + To time.Time + func NewPeriodForDate(date time.Time) *Period