rss

package
v0.0.0-...-585e8d0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2017 License: GPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeHTMLize

func DeHTMLize(str string) string
func ExtractRSSLink(c appengine.Context, sourceURL string, html string) (string, error)

Types

type Entry

type Entry struct {
	GUID      string
	Author    string
	Title     string
	WWWURL    string
	Content   string
	Published time.Time
	Updated   time.Time
	Media     []Media
}

func (Entry) Digest

func (entry Entry) Digest() []byte

func (*Entry) LatestModification

func (entry *Entry) LatestModification() time.Time

func (Entry) Summary

func (entry Entry) Summary() string

func (*Entry) UniqueID

func (entry *Entry) UniqueID() string

type Feed

type Feed struct {
	URL                   string
	Title                 string
	Description           string
	Updated               time.Time
	WWWURL                string
	Format                string
	HourlyUpdateFrequency float32
	Entries               []*Entry
	HubURL                string
	Topic                 string
}

func UnmarshalStream

func UnmarshalStream(url string, reader io.Reader) (feed *Feed, err error)

func (Feed) Digest

func (feed Feed) Digest() []byte

func (*Feed) DurationBetweenUpdates

func (feed *Feed) DurationBetweenUpdates() time.Duration

type FeedMarshaler

type FeedMarshaler interface {
	Marshal() (*Feed, error)
}

type GenericFeed

type GenericFeed struct {
	XMLName xml.Name
}

type Media

type Media struct {
	URL   string
	Type  string
	Title string
}

type OPML

type OPML struct {
	XMLName xml.Name `xml:"opml"`
	Version string   `xml:"version,attr,omitempty"`
	Head    head     `xml:"head"`
	Body    opmlBody `xml:"body"`
}

func NewOPML

func NewOPML() OPML

func ParseOPML

func ParseOPML(reader io.Reader) (*OPML, error)

func (*OPML) Add

func (opml *OPML) Add(outline *Outline)

func (*OPML) Outlines

func (opml *OPML) Outlines() []*Outline

func (*OPML) SetTitle

func (opml *OPML) SetTitle(title string)

func (*OPML) Title

func (opml *OPML) Title() string

type Outline

type Outline struct {
	Text     string     `xml:"text,attr"`
	Title    string     `xml:"title,attr"`
	Type     string     `xml:"type,attr,omitempty"`
	FeedURL  string     `xml:"xmlUrl,attr,omitempty"`
	WebURL   string     `xml:"htmlUrl,attr,omitempty"`
	Outlines []*Outline `xml:"outline"`
}

func NewFolder

func NewFolder(title string) *Outline

func NewSubscription

func NewSubscription(title string, feedURL string, webURL string) *Outline

func (*Outline) Add

func (outline *Outline) Add(child *Outline)

func (Outline) IsFolder

func (outline Outline) IsFolder() bool

func (Outline) IsSubscription

func (outline Outline) IsSubscription() bool

type SortableTimes

type SortableTimes []time.Time

func (SortableTimes) Len

func (s SortableTimes) Len() int

func (SortableTimes) Less

func (s SortableTimes) Less(i int, j int) bool

func (SortableTimes) Swap

func (s SortableTimes) Swap(i int, j int)

Jump to

Keyboard shortcuts

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