riviera: hawx.me/code/riviera/river/mapping Index | Files

package mapping

import "hawx.me/code/riviera/river/mapping"

Package mapping converts a feed item into a riverjs item.

Index

Package Files

default.go mapping.go

func DefaultMapping Uses

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.

type Mapping Uses

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.

Package mapping imports 7 packages (graph) and is imported by 6 packages. Updated 2019-04-23. Refresh now. Tools for package owners.