summaryrefslogtreecommitdiff
path: root/atom/atom.go
diff options
context:
space:
mode:
authorLaria Carolin Chabowski <laria@laria.me>2021-01-01 14:46:54 +0100
committerLaria Carolin Chabowski <laria@laria.me>2021-01-01 14:46:54 +0100
commit85473656174b1b1d6221d3bb76cc12fa5f7f7e8d (patch)
tree37349eee4f64781f06e8597dc4c457801eb03a47 /atom/atom.go
downloadlaria.me-85473656174b1b1d6221d3bb76cc12fa5f7f7e8d.tar.gz
laria.me-85473656174b1b1d6221d3bb76cc12fa5f7f7e8d.tar.bz2
laria.me-85473656174b1b1d6221d3bb76cc12fa5f7f7e8d.zip
Initial commit
Diffstat (limited to 'atom/atom.go')
-rw-r--r--atom/atom.go40
1 files changed, 40 insertions, 0 deletions
diff --git a/atom/atom.go b/atom/atom.go
new file mode 100644
index 0000000..a74a981
--- /dev/null
+++ b/atom/atom.go
@@ -0,0 +1,40 @@
+package atom
+
+import "time"
+
+type Link struct {
+ XMLName struct{} `xml:"link"`
+
+ Href string `xml:"href,attr"`
+ Rel string `xml:"rel,attr,omitempty"`
+}
+
+type Summary struct {
+ XMLName struct{} `xml:"summary"`
+
+ Type string `xml:"type,attr"`
+ Content string `xml:",chardata"`
+}
+
+type Entry struct {
+ XMLName struct{} `xml:"entry"`
+
+ Title string `xml:"title"`
+ Id string `xml:"id"`
+ Updated time.Time `xml:"updated"`
+ Summary Summary
+ Links []Link
+}
+
+type Feed struct {
+ XMLName struct{} `xml:"http://www.w3.org/2005/Atom feed"`
+
+ Title string `xml:"title"`
+ Links []Link
+ Id string `xml:"id"`
+ AuthorName string `xml:"author>name"`
+ AuthorEmail string `xml:"author>email"`
+ AuthorUri string `xml:"author>uri"`
+ Updated time.Time `xml:"updated"`
+ Entries []Entry
+}