Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAtom ¶
func GenerateAtom(posts []*models.Post, config AtomConfig) (string, error)
GenerateAtom generates an Atom 1.0 feed from posts
Types ¶
type AtomAuthor ¶
AtomAuthor represents an Atom author element
type AtomConfig ¶
type AtomConfig struct {
Title string
Link string
Description string
Author string
AuthorEmail string
BlogPath string
}
AtomConfig contains configuration for Atom feed generation
type AtomContent ¶
AtomContent represents Atom content element
type AtomEntry ¶
type AtomEntry struct {
Title string `xml:"title"`
Link []AtomLink `xml:"link"`
ID string `xml:"id"`
Updated string `xml:"updated"`
Summary string `xml:"summary,omitempty"`
Content *AtomContent `xml:"content,omitempty"`
Author *AtomAuthor `xml:"author,omitempty"`
}
AtomEntry represents an Atom entry (post)
type AtomFeed ¶
type AtomFeed struct {
XMLName xml.Name `xml:"feed"`
XMLNS string `xml:"xmlns,attr"`
Title string `xml:"title"`
Link []AtomLink `xml:"link"`
ID string `xml:"id"`
Updated string `xml:"updated"`
Author *AtomAuthor `xml:"author,omitempty"`
Entries []AtomEntry `xml:"entry"`
}
AtomFeed represents the root Atom 1.0 feed
type AtomLink ¶
type AtomLink struct {
Href string `xml:"href,attr"`
Rel string `xml:"rel,attr,omitempty"`
Type string `xml:"type,attr,omitempty"`
}
AtomLink represents an Atom link element
type RSS2Channel ¶
type RSS2Channel struct {
Title string `xml:"title"`
Link string `xml:"link"`
Description string `xml:"description"`
Language string `xml:"language,omitempty"`
Copyright string `xml:"copyright,omitempty"`
LastBuildDate string `xml:"lastBuildDate,omitempty"`
PubDate string `xml:"pubDate,omitempty"`
Generator string `xml:"generator,omitempty"`
Items []RSS2Item `xml:"item"`
}
RSS2Channel represents the RSS channel
type RSS2Feed ¶
type RSS2Feed struct {
XMLName xml.Name `xml:"rss"`
Version string `xml:"version,attr"`
Channel *RSS2Channel `xml:"channel"`
}
RSS2Feed represents the root RSS 2.0 feed
Click to show internal directories.
Click to hide internal directories.