miniflux

package
v0.98.0 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package miniflux implements the Miniflux adapter for the reader capability.

Package miniflux implements the RSS/feed reading capability.

Index

Constants

View Source
const (
	OpListFeeds       = "list_feeds"
	OpCreateFeed      = "create_feed"
	OpListEntries     = "list_entries"
	OpMarkEntryRead   = "mark_entry_read"
	OpMarkEntryUnread = "mark_entry_unread"
	OpStarEntry       = "star_entry"
	OpUnstarEntry     = "unstar_entry"
	OpHealth          = "health"
)

Variables

This section is empty.

Functions

func Register

func Register(app string, svc Service) error

Register registers the miniflux capability with hub and invoker registry. When svc is nil the provider is not configured and registration is skipped.

Types

type Adapter

type Adapter struct {
	// contains filtered or unexported fields
}

func (*Adapter) CreateFeed

func (a *Adapter) CreateFeed(ctx context.Context, feedURL string) (*capability.Feed, error)

func (*Adapter) HealthCheck

func (a *Adapter) HealthCheck(ctx context.Context) (bool, error)

HealthCheck reports whether the Miniflux backend is reachable by listing feeds.

func (*Adapter) ListEntries

func (*Adapter) ListFeeds

func (*Adapter) MarkEntryRead

func (a *Adapter) MarkEntryRead(ctx context.Context, id int64) error

func (*Adapter) MarkEntryUnread

func (a *Adapter) MarkEntryUnread(ctx context.Context, id int64) error

func (*Adapter) StarEntry

func (a *Adapter) StarEntry(ctx context.Context, id int64) error

func (*Adapter) UnstarEntry

func (a *Adapter) UnstarEntry(ctx context.Context, id int64) error

type EntryQuery

type EntryQuery = capability.ReaderEntryQuery

EntryQuery wraps pagination and filters for listing entries.

type FeedQuery

type FeedQuery = capability.ReaderFeedQuery

FeedQuery wraps pagination for listing feeds.

type Service

type Service interface {
	ListFeeds(ctx context.Context, q *FeedQuery) (*capability.ListResult[capability.Feed], error)
	CreateFeed(ctx context.Context, feedURL string) (*capability.Feed, error)
	ListEntries(ctx context.Context, q *EntryQuery) (*capability.ListResult[capability.Entry], error)
	MarkEntryRead(ctx context.Context, id int64) error
	MarkEntryUnread(ctx context.Context, id int64) error
	StarEntry(ctx context.Context, id int64) error
	UnstarEntry(ctx context.Context, id int64) error
	HealthCheck(ctx context.Context) (bool, error)
}

Service defines the reader capability contract.

func New

func New() Service

func NewWithClient

func NewWithClient(client client) Service

type Webhook

type Webhook struct {
	// contains filtered or unexported fields
}

Webhook implements capability.WebhookConverter for Miniflux RSS reader webhooks. It validates HMAC-SHA256 signatures and converts Miniflux webhook payloads into DataEvent records for the pipeline engine.

func NewWebhook

func NewWebhook() *Webhook

NewWebhook creates a Webhook that reads the HMAC secret from the miniflux provider config lazily at verification time.

func (*Webhook) Convert

func (*Webhook) Convert(body []byte, _ map[string]string) ([]types.DataEvent, error)

Convert transforms the raw Miniflux webhook body into one or more DataEvent records. new_entries produces a single batch event with all entries in the Data KV. save_entry produces a single event with the saved entry in the Data KV.

func (*Webhook) VerifySignature

func (w *Webhook) VerifySignature(headers map[string]string, body []byte) error

VerifySignature validates the HMAC-SHA256 signature from the X-Miniflux-Signature header. The secret is read from provider config at verification time via getSecret.

func (*Webhook) WebhookPath

func (*Webhook) WebhookPath() string

WebhookPath returns the URL path segment for Miniflux webhooks. The full URL is /webhook/provider/miniflux/events.

Jump to

Keyboard shortcuts

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