mockfeed

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package mockfeed provides an in-memory feed server used by both the Go unit tests (as an httptest.Server) and the standalone mockserver binary (for the haybarn SQL E2E). It serves a fixed RSS 2.0 feed at /rss, an Atom feed at /atom, and a JSON Feed at /json, plus a /malformed endpoint that returns garbage for negative tests.

Index

Constants

View Source
const Atom = `` /* 1071-byte string literal not displayed */

Atom is a valid Atom 1.0 document with two entries.

View Source
const JSON = `` /* 970-byte string literal not displayed */

JSON is a valid JSON Feed 1.1 document with two items.

View Source
const Malformed = `<rss><channel><title>broken</title><item><title>oops`

Malformed is intentionally invalid (neither well-formed XML nor JSON) so a negative test can assert the worker surfaces a parse error.

View Source
const RSS = `` /* 1015-byte string literal not displayed */

RSS is a valid RSS 2.0 document with two items.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler() http.Handler

NewHandler returns the feed HTTP handler serving /rss, /atom, /json, and /malformed.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL