Documentation ¶
Index ¶
- Constants
- func HTML(content string) *atom_str
- func MarshalIndent(in Channel, indent string) (raw []byte, err error)
- func RSSCategories(in []feeds.Category) (out []string)
- func RSSPersons(in []feeds.Person) (out string)
- func Standard(in Channel, allowedTimeFormats ...string) (out feeds.Feed, err error)
- func StandardCategories(in []string) (out []feeds.Category)
- func StandardEnclosures(in []Enclosure) (out []feeds.Link)
- func StandardEntries(in []Item, atfs ...string) (out []feeds.Entry, err error)
- func StandardEntry(in Item, atfs ...string) (out feeds.Entry, err error)
- func StandardPersons(in string) (out []feeds.Person)
- func StandardSource(in *Source) (out feeds.FeedMeta)
- func StandardTime(in string, formats ...string) (out time.Time, errs error)
- func String(t, content string) *atom_str
- func Text(content string) *atom_str
- func UnmarshalAttributes(in common.Attributes) (out feeds.Attributes)
- func UnmarshalExtensions(in common.Extensions) (out feeds.Extensions)
- type Channel
- type ChannelMeta
- type Enclosure
- type Image
- type Item
- type Source
Constants ¶
View Source
const ( TextTypeText = "text" TextTypeHtml = "html" )
Variables ¶
This section is empty.
Functions ¶
func StandardEntries ¶
func String ¶
func String(t, content string) *atom_str
String returns an atom_str with the provided type and content. You should use the TextType* constants as the first argument and your processed content as the second, or use the more specific creators like Text() and HTML().
func UnmarshalAttributes ¶
func UnmarshalAttributes(in common.Attributes) (out feeds.Attributes)
func UnmarshalExtensions ¶
func UnmarshalExtensions(in common.Extensions) (out feeds.Extensions)
Types ¶
type Channel ¶
type Channel struct { XMLName xml.Name `xml:"channel"` ChannelMeta Extensions common.Extensions `xml:",any,omitempty"` Image Image `xml:"image,omitempty"` Entries []Item `xml:"item"` }
Channel is a single feed that can be marshalled to XML
type ChannelMeta ¶
type ChannelMeta struct { common.XmlAttrs XMLName xml.Name `xml:"channel"` Title string `xml:"title"` Id string `xml:"link"` Description string `xml:"description"` Language string `xml:"language,omitempty"` Rights string `xml:"copyright,omitempty"` Published string `xml:"pubDate"` Updated string `xml:"lastBuildDate"` Categories []string `xml:"category"` Generator string `xml:"generator,omitempty"` }
type Enclosure ¶
type Image ¶
type Item ¶
type Item struct { common.XmlAttrs XMLName xml.Name `xml:"item"` Title string `xml:"title"` Link string `xml:"link"` Description string `xml:"description"` Author string `xml:"author,omitempty"` Categories []string `xml:"category,omitempty"` Enclosures []Enclosure `xml:"enclosure,omitempty"` GUID string `xml:"guid,omitempty"` Published string `xml:"pubDate,omitempty"` Source *Source `xml:"source,omitempty"` Extensions common.Extensions `xml:",any,omitempty"` }
Click to show internal directories.
Click to hide internal directories.