Documentation
¶
Index ¶
- func ToXML(feed XmlFeed) (string, error)
- func WriteXML(feed XmlFeed, w io.Writer) error
- type Atom
- type AtomAuthor
- type AtomContent
- type AtomContributor
- type AtomEntry
- type AtomFeed
- type AtomLink
- type AtomPerson
- type AtomSummary
- type Author
- type Feed
- type Item
- type Link
- type Media
- type Rss
- type RssEnclosure
- type RssFeed
- type RssImage
- type RssItem
- type RssMedia
- type RssMediaGroup
- type RssTextInput
- type UUID
- type XmlFeed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Atom ¶
type Atom struct {
*Feed
}
type AtomAuthor ¶
type AtomAuthor struct { XMLName xml.Name `xml:"author"` AtomPerson }
type AtomContent ¶
type AtomContributor ¶
type AtomContributor struct { XMLName xml.Name `xml:"contributor"` AtomPerson }
type AtomEntry ¶
type AtomEntry struct { XMLName xml.Name `xml:"entry"` Xmlns string `xml:"xmlns,attr,omitempty"` Title string `xml:"title"` // required Updated string `xml:"updated"` // required Id string `xml:"id"` // required Category string `xml:"category,omitempty"` Content *AtomContent Rights string `xml:"rights,omitempty"` Source string `xml:"source,omitempty"` Published string `xml:"published,omitempty"` Contributor *AtomContributor Link *AtomLink // required if no child 'content' elements Summary *AtomSummary // required if content has src or content is base64 Author *AtomAuthor // required if feed lacks an author }
type AtomFeed ¶
type AtomFeed struct { XMLName xml.Name `xml:"feed"` Xmlns string `xml:"xmlns,attr"` Title string `xml:"title"` // required Id string `xml:"id"` // required Updated string `xml:"updated"` // required Category string `xml:"category,omitempty"` Icon string `xml:"icon,omitempty"` Logo string `xml:"logo,omitempty"` Rights string `xml:"rights,omitempty"` // copyright used Subtitle string `xml:"subtitle,omitempty"` Link *AtomLink Author *AtomAuthor `xml:"author,omitempty"` Contributor *AtomContributor Entries []*AtomEntry }
type AtomLink ¶
type AtomLink struct { //Atom 1.0 <link rel="enclosure" type="audio/mpeg" title="MP3" href="http://www.example.org/myaudiofile.mp3" length="1234" /> XMLName xml.Name `xml:"link"` Href string `xml:"href,attr"` Rel string `xml:"rel,attr,omitempty"` Type string `xml:"type,attr,omitempty"` Length string `xml:"length,attr,omitempty"` }
type AtomPerson ¶
type AtomSummary ¶
type Feed ¶
type Feed struct { Title string Link *Link Description string Author *Author Updated time.Time Created time.Time Id string Subtitle string Items []*Item Copyright string }
type Rss ¶
type Rss struct {
*Feed
}
type RssEnclosure ¶
type RssFeed ¶
type RssFeed struct { XMLName xml.Name `xml:"channel"` Title string `xml:"title"` // required Link string `xml:"link"` // required Description string `xml:"description"` // required Language string `xml:"language,omitempty"` Copyright string `xml:"copyright,omitempty"` ManagingEditor string `xml:"managingEditor,omitempty"` // Author used WebMaster string `xml:"webMaster,omitempty"` PubDate string `xml:"pubDate,omitempty"` // created or updated LastBuildDate string `xml:"lastBuildDate,omitempty"` // updated used Category string `xml:"category,omitempty"` Generator string `xml:"generator,omitempty"` Docs string `xml:"docs,omitempty"` Cloud string `xml:"cloud,omitempty"` Ttl int `xml:"ttl,omitempty"` Rating string `xml:"rating,omitempty"` SkipHours string `xml:"skipHours,omitempty"` SkipDays string `xml:"skipDays,omitempty"` Image *RssImage TextInput *RssTextInput Items []*RssItem }
type RssItem ¶
type RssItem struct { XMLName xml.Name `xml:"item"` Title string `xml:"title"` // required Link string `xml:"link"` // required Description string `xml:"description"` // required Author string `xml:"author,omitempty"` Category string `xml:"category,omitempty"` Comments string `xml:"comments,omitempty"` Enclosure *RssEnclosure Guid string `xml:"guid,omitempty"` // Id used PubDate string `xml:"pubDate,omitempty"` // created or updated Source string `xml:"source,omitempty"` MediaGroup *RssMediaGroup `xml:"media:group,omitempty"` MediaContent *RssMedia `xml:"media:content,omitempty"` }
type RssMediaGroup ¶
type RssTextInput ¶
Click to show internal directories.
Click to hide internal directories.