rss

package
v0.0.0-...-f3a3104 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const MIMEType = "text/xml"

MIMEType for RSS. Seems text/xml is more used than application/rss+xml

View Source
const XMLNSItunes = "http://www.itunes.com/dtds/podcast-1.0.dtd"

XMLNSItunes is "http://www.itunes.com/dtds/podcast-1.0.dtd"

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	XMLName       xml.Name     `xml:"channel"`
	Title         string       `xml:"title,omitempty"`
	Description   string       `xml:"description,omitempty"`
	Link          string       `xml:"link,omitempty"`
	LastBuildDate string       `xml:"lastBuildDate,omitempty"`
	Image         *Image       `xml:"image,omitempty"`
	ItunesImage   *ItunesImage `xml:"itunes:image,omitempty"`
	Items         []*Item      `xml:"item"`
}

Channel <channel> rss element

type Enclosure

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

Enclosure <enclosure> rss>channel>item element

type Image

type Image struct {
	XMLName xml.Name `xml:"image"`
	Title   string   `xml:"title,omitempty"`
	URL     string   `xml:"url,omitempty"`
	Link    string   `xml:"link,omitempty"`
}

Image <image> rss>channel element

type Item

type Item struct {
	XMLName      xml.Name     `xml:"item"`
	Title        string       `xml:"title,omitempty"`
	ItunesAuthor string       `xml:"http://www.itunes.com/dtds/podcast-1.0.dtd author,omitempty"`
	ItunesImage  *ItunesImage `xml:"itunes:image,omitempty"`
	Link         string       `xml:"link,omitempty"`
	Description  string       `xml:"description,omitempty"`
	PubDate      string       `xml:"pubDate,omitempty"`
	GUID         string       `xml:"guid,omitempty"`
	Enclosure    *Enclosure   `xml:"enclosure"`
}

Item <item> rss>channel element

type ItunesImage

type ItunesImage struct {
	XMLName xml.Name `xml:"itunes:image"`
	HRef    string   `xml:"href,attr,omitempty"`
}

ItunesImage <itunes:image:> rss>channel>item element

type RSS

type RSS struct {
	XMLName     xml.Name `xml:"rss"`
	Version     string   `xml:"version,attr"` // hack for xml namespace prefix
	XMLNSItunes string   `xml:"xmlns:itunes,attr"`
	Channel     *Channel `xml:"channel"`
}

RSS <rss> root element

Jump to

Keyboard shortcuts

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