Documentation
¶
Overview ¶
Package feed generates Atom and JSON Feed documents from change_events.
Both formats follow established standards:
- Atom 1.0 (RFC 4287)
- JSON Feed 1.1 (https://www.jsonfeed.org/version/1.1/)
The functions are pure: they take a slice of events plus metadata and return bytes. They do not hit the store. They do not hit the network. This makes them trivially testable and usable from both the API handlers and the notifier worker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
ID string
Title string
Summary string
Link string
Published time.Time
Updated time.Time
Categories []string
}
Entry is the common projection of a change_event for feed rendering.
func FromChangeEvents ¶
func FromChangeEvents(meta Meta, events []store.ChangeEvent) []Entry
FromChangeEvents builds feed entries from a slice of change_events.
Click to show internal directories.
Click to hide internal directories.