feedgen

package module
v0.0.0-...-eac7927 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 4 Imported by: 0

README

feedgen

A middleware to generate Atom feeds from websites. https://feedgen.org

Supported Sites and Examples

Getting Started

Start the web by docker-compose:

docker-compose up -d

It's on http://localhost:8080.

License

feedgen is released under the MIT license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CountDigits

func CountDigits(i int64) (count int)

func SortFeedItemsLatestFirst

func SortFeedItemsLatestFirst(members []*feeds.Item)

SortFeedItemsLatestFirst sorts feed items by Created in descending order.

Types

type ItemFetchError

type ItemFetchError struct {
	SourceURL string
}

ItemFetchError shows that the item can't be fetched from the source URL.

func (ItemFetchError) Error

func (e ItemFetchError) Error() string

Error returns error message

type PageContentFetchError

type PageContentFetchError struct {
	SourceURL string
}

PageContentFetchError shows that the page content can't be fetched from the source URL.

func (PageContentFetchError) Error

func (e PageContentFetchError) Error() string

Error returns error message

type PageContentNotFoundError

type PageContentNotFoundError struct {
	SourceURL string
}

PageContentNotFoundError shows that the page content is not available from the source URL.

func (PageContentNotFoundError) Error

func (e PageContentNotFoundError) Error() string

Error returns error message

type ParameterNotFoundError

type ParameterNotFoundError struct {
	Parameter string
}

ParameterNotFoundError shows that the parameter Parameter is required.

func (ParameterNotFoundError) Error

func (e ParameterNotFoundError) Error() string

Error returns error message

type ParameterValueInvalidError

type ParameterValueInvalidError struct {
	Parameter string
}

ParameterValueInvalidError shows that the query parameter Parameter's value is not available yet.

func (ParameterValueInvalidError) Error

Error returns error message

type Parser

type Parser interface {
	// GetFeed returns feed generated from the source site.
	GetFeed(query QueryValues) (feed *feeds.Feed, err error)
}

Parser is a interface that defines a method to generates feed from query parameters.

type QueryValues

type QueryValues = url.Values

QueryValues is an alias of url.Values. It is typically used for query parameters and form values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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