rss

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Layout string = "Mon, _2 Jan 2006 15:04:05 -0700"

Variables

View Source
var (
	ErrCouldNotGetContent   = errors.New("Could not get content")
	ErrCouldNotParseContent = errors.New("Could not parse content")
)

Functions

This section is empty.

Types

type Channel

type Channel struct {
	XMLName     xml.Name `xml:"channel"`
	Items       []Item   `xml:"item"`
	Title       ChannelTitle
	Description ChannelDescription
}

type ChannelDescription

type ChannelDescription struct {
	XMLName     xml.Name `xml:"description"`
	Description string   `xml:",chardata"`
}

type ChannelTitle

type ChannelTitle struct {
	XMLName xml.Name `xml:"title"`
	Title   string   `xml:",chardata"`
}

type Enclosure

type Enclosure struct {
	XMLName xml.Name `xml:"enclosure"`
	URL     string   `xml:"url,attr"`
	Length  int      `xml:"length,attr"`
	Type    string   `xml:"type,attr"`
}

type Item

type Item struct {
	Title      ItemTitle
	Enclosure  Enclosure
	Downloaded bool
	Date       PodcastDate
}
type ItemLink struct {
	XMLName xml.Name `xml:"link"`
	Link    string   `xml:",chardata"`
}

type ItemTitle

type ItemTitle struct {
	XMLName xml.Name `xml:"title"`
	Title   string   `xml:",chardata"`
}

type PodcastDate

type PodcastDate struct {
	XMLName xml.Name `xml:"pubDate"`
	Date    string   `xml:",chardata"`
}

type PodcastFeed

type PodcastFeed struct {
	XMLName xml.Name `xml:"rss"`
	Channel Channel
}

func Parse

func Parse(content io.Reader) (*PodcastFeed, error)

Jump to

Keyboard shortcuts

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