Documentation ¶
Index ¶
- func Construct(s *state.State, logger *slog.Logger) (string, error)
- func ToXML(feed XmlFeed) (string, error)
- func Write(s *state.State, atom 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 Image
- type Item
- type Link
- 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 AtomCategories ¶
type AtomCategories []string
type AtomContent ¶
type AtomContributor ¶
type AtomContributor struct { XMLName xml.Name `xml:"contributor"` AtomPerson }
type AtomEntry ¶
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 ¶
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 ¶
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 ¶
type AtomSummary ¶
type Feed ¶
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 }
Click to show internal directories.
Click to hide internal directories.