rss

package
v2.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	Domain string `json:"domain,omitempty"`
	Value  string `json:"value,omitempty"`
}

Category is category metadata for Feeds and Entries

type Cloud

type Cloud struct {
	Domain            string `json:"domain,omitempty"`
	Port              string `json:"port,omitempty"`
	Path              string `json:"path,omitempty"`
	RegisterProcedure string `json:"registerProcedure,omitempty"`
	Protocol          string `json:"protocol,omitempty"`
}

Cloud allows processes to register with a cloud to be notified of updates to the channel, implementing a lightweight publish-subscribe protocol for RSS feeds

type Enclosure

type Enclosure struct {
	URL    string `json:"url,omitempty"`
	Length string `json:"length,omitempty"`
	Type   string `json:"type,omitempty"`
}

Enclosure is a media object that is attached to the item

type Feed

type Feed struct {
	Title               string                   `json:"title,omitempty"`
	Links               []string                 `json:"links,omitempty"`
	AtomLinks           []*atom.Link             `json:"atomLinks,omitempty"`
	Description         string                   `json:"description,omitempty"`
	Language            string                   `json:"language,omitempty"`
	Copyright           string                   `json:"copyright,omitempty"`
	ManagingEditor      string                   `json:"managingEditor,omitempty"`
	WebMaster           string                   `json:"webMaster,omitempty"`
	PubDate             string                   `json:"pubDate,omitempty"`
	PubDateParsed       *time.Time               `json:"pubDateParsed,omitempty"`
	LastBuildDate       string                   `json:"lastBuildDate,omitempty"`
	LastBuildDateParsed *time.Time               `json:"lastBuildDateParsed,omitempty"`
	Categories          []*Category              `json:"categories,omitempty"`
	Generator           string                   `json:"generator,omitempty"`
	Docs                string                   `json:"docs,omitempty"`
	TTL                 string                   `json:"ttl,omitempty"`
	Image               *Image                   `json:"image,omitempty"`
	Rating              string                   `json:"rating,omitempty"`
	SkipHours           []string                 `json:"skipHours,omitempty"`
	SkipDays            []string                 `json:"skipDays,omitempty"`
	Cloud               *Cloud                   `json:"cloud,omitempty"`
	TextInput           *TextInput               `json:"textInput,omitempty"`
	DublinCoreExt       *ext.DublinCoreExtension `json:"dcExt,omitempty"`
	ITunesExt           *ext.ITunesFeedExtension `json:"itunesExt,omitempty"`
	Media               *ext.Media               `json:"media,omitempty"`
	Extensions          ext.Extensions           `json:"extensions,omitempty"`
	Items               []*Item                  `json:"items,omitempty"`
	Version             string                   `json:"version,omitempty"`
}

Feed is an RSS Feed

func (*Feed) AllCategories

func (self *Feed) AllCategories() iter.Seq[string]
func (self *Feed) FeedLink() (link string)

func (*Feed) GetAuthor

func (self *Feed) GetAuthor() (name, address string, ok bool)

func (*Feed) GetCopyright

func (self *Feed) GetCopyright() string

func (*Feed) GetDescription

func (self *Feed) GetDescription() string

func (*Feed) GetImage

func (self *Feed) GetImage() *Image

func (*Feed) GetLanguage

func (self *Feed) GetLanguage() string

func (*Feed) GetTTL

func (self *Feed) GetTTL() int

func (*Feed) GetTitle

func (self *Feed) GetTitle() string

func (*Feed) GetUpdated

func (self *Feed) GetUpdated() string

func (*Feed) GetUpdatedParsed

func (self *Feed) GetUpdatedParsed() *time.Time
func (self *Feed) Link() string

func (*Feed) LinkSeq

func (self *Feed) LinkSeq() iter.Seq[string]

func (*Feed) String

func (self *Feed) String() string

type GUID

type GUID struct {
	Value       string `json:"value,omitempty"`
	IsPermalink string `json:"isPermalink,omitempty"`
}

GUID is a unique identifier for an item

type Image

type Image struct {
	URL         string `json:"url,omitempty"`
	Link        string `json:"link,omitempty"`
	Title       string `json:"title,omitempty"`
	Width       string `json:"width,omitempty"`
	Height      string `json:"height,omitempty"`
	Description string `json:"description,omitempty"`
}

Image is an image that represents the feed

type Item

type Item struct {
	Title         string                   `json:"title,omitempty"`
	Links         []string                 `json:"links,omitempty"`
	AtomLinks     []*atom.Link             `json:"atomLinks,omitempty"`
	Description   string                   `json:"description,omitempty"`
	Content       string                   `json:"content,omitempty"`
	Author        string                   `json:"author,omitempty"`
	Categories    []*Category              `json:"categories,omitempty"`
	Comments      string                   `json:"comments,omitempty"`
	Enclosure     *Enclosure               `json:"enclosure,omitempty"`
	GUID          *GUID                    `json:"guid,omitempty"`
	PubDate       string                   `json:"pubDate,omitempty"`
	PubDateParsed *time.Time               `json:"pubDateParsed,omitempty"`
	Source        *Source                  `json:"source,omitempty"`
	DublinCoreExt *ext.DublinCoreExtension `json:"dcExt,omitempty"`
	ITunesExt     *ext.ITunesItemExtension `json:"itunesExt,omitempty"`
	Media         *ext.Media               `json:"media,omitempty"`
	Extensions    ext.Extensions           `json:"extensions,omitempty"`
}

Item is an RSS Item

func (*Item) AllCategories

func (self *Item) AllCategories() iter.Seq[string]

func (*Item) AllEnclosures

func (self *Item) AllEnclosures() iter.Seq[Enclosure]

func (*Item) GetAuthor

func (self *Item) GetAuthor() (name, address string, ok bool)

func (*Item) GetContent

func (self *Item) GetContent() string

func (*Item) GetDescription

func (self *Item) GetDescription() string

func (*Item) GetGUID

func (self *Item) GetGUID() string

func (*Item) GetPublished

func (self *Item) GetPublished() string

func (*Item) GetPublishedParsed

func (self *Item) GetPublishedParsed() *time.Time

func (*Item) GetTitle

func (self *Item) GetTitle() string

func (*Item) ImageURL

func (self *Item) ImageURL() string
func (self *Item) Link() string

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser is a RSS Parser

func NewParser

func NewParser() *Parser

NewParser creates a new RSS parser

func (*Parser) Err

func (self *Parser) Err() error

func (*Parser) Parse

func (self *Parser) Parse(r io.Reader, opts ...options.Option) (*Feed, error)

Parse parses an xml feed into an rss.Feed

type Source

type Source struct {
	Title string `json:"title,omitempty"`
	URL   string `json:"url,omitempty"`
}

Source contains feed information for another feed if a given item came from that feed

type TextInput

type TextInput struct {
	Title       string `json:"title,omitempty"`
	Description string `json:"description,omitempty"`
	Name        string `json:"name,omitempty"`
	Link        string `json:"link,omitempty"`
}

TextInput specifies a text input box that can be displayed with the channel

Jump to

Keyboard shortcuts

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