mapping

package
v0.0.0-...-44d4e1f Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package mapping converts a feed item into a riverjs item.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultMapping

func DefaultMapping(item *common.Item) *riverjs.Item

DefaultMapping will always return an item. It: attempts to parse the PubDate, otherwise uses the current time; truncates the description to 280 characters; finds the correct Link and PermaLink; copies any Enclosures; and fills out the other properties by copying the correct values.

Types

type Mapping

type Mapping func(*common.Item) *riverjs.Item

A Mapping takes an item from a feed and returns an item for the river, if nil is returned the item will not be added to the river.

Jump to

Keyboard shortcuts

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