Documentation
¶
Index ¶
- func ToXML(feed XmlFeed) (string, error)
- func WriteXML(feed XmlFeed, w io.Writer) error
- type Atom
- type AtomAuthor
- type AtomCategories
- type AtomContent
- type AtomContributor
- type AtomEntry
- type AtomFeed
- type AtomLink
- type AtomPerson
- type AtomSummary
- type Author
- type Enclosure
- type Feed
- type FeedDeps
- type Image
- type Item
- type Link
- type UUID
- type XmlFeed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Atom ¶ added in v1.1.0
type Atom struct {
*Feed
}
type AtomAuthor ¶ added in v1.1.0
type AtomAuthor struct {
XMLName xml.Name `xml:"author"`
AtomPerson
}
type AtomCategories ¶ added in v1.1.0
type AtomCategories []string
type AtomContent ¶ added in v1.1.0
type AtomContributor ¶ added in v1.1.0
type AtomContributor struct {
XMLName xml.Name `xml:"contributor"`
AtomPerson
}
type AtomEntry ¶ added in v1.1.0
type AtomEntry struct {
Content *AtomContent
Author *AtomAuthor
Summary *AtomSummary
Contributor *AtomContributor
XMLName xml.Name `xml:"entry"`
Updated string `xml:"updated"`
Rights string `xml:"rights,omitempty"`
Source string `xml:"source,omitempty"`
Published string `xml:"published,omitempty"`
Id string `xml:"id"`
Title string `xml:"title"`
Xmlns string `xml:"xmlns,attr,omitempty"`
Links []AtomLink
Categories AtomCategories `xml:"category,omitempty"`
}
type AtomFeed ¶ added in v1.1.0
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
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 `xml:"entry"`
}
type AtomLink ¶ added in v1.1.0
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"`
}
Multiple links with different rel can coexist
type AtomPerson ¶ added in v1.1.0
type AtomSummary ¶ added in v1.1.0
type Feed ¶ added in v1.1.0
type Feed struct {
Updated time.Time
Created time.Time
Link *Link
Author *Author
Image *Image
Title string
Description string
Id string
Subtitle string
Copyright string
Items []*Item
}
type FeedDeps ¶ added in v1.1.4
type FeedDeps struct {
Config *config.Config
Entries map[string]entry.Entry
InDir string
OutDir string
DryRun bool
}
func (*FeedDeps) ConstructFeed ¶ added in v1.1.4
Click to show internal directories.
Click to hide internal directories.