You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
728 B
33 lines
728 B
package models |
|
|
|
import ( |
|
"encoding/xml" |
|
"html/template" |
|
) |
|
|
|
type Rss2 struct { |
|
XMLName xml.Name `xml:"rss"` |
|
Version string `xml:"version,attr"` |
|
// Required |
|
Title string `xml:"channel>title"` |
|
Link string `xml:"channel>link"` |
|
Description string `xml:"channel>description"` |
|
// Optional |
|
PubDate string `xml:"channel>pubDate"` |
|
ItemList []Item `xml:"channel>item"` |
|
} |
|
|
|
type Item struct { |
|
// Required |
|
Title string `xml:"title"` |
|
Link string `xml:"link"` |
|
Description template.HTML `xml:"description"` |
|
// Optional |
|
Content template.HTML `xml:"encoded"` |
|
PubDate string `xml:"pubDate"` |
|
Comments string `xml:"comments"` |
|
} |
|
|
|
type SendItems struct { |
|
ItemList []Item |
|
}
|
|
|