-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathfeed.go
More file actions
75 lines (67 loc) · 1.43 KB
/
feed.go
File metadata and controls
75 lines (67 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package rss
import (
"time"
)
type (
// Feed is the top-level structure for an
// RSS/Atom feed.
Feed struct {
Title string
Language string
Author *Author
Description string
Links []*Link // Link to the creator's website.
UpdateURL string // URL of the feed itself.
Image *Image // Optional feed icon.
Categories []string
Items []*Item
NextUpdate time.Time // Earliest time this feed should next be checked.
Unread uint32 // Number of unread items. Used by aggregators.
}
// Author records information about
// a feed's author.
Author struct {
Name string
URL string
Email string
Links []*Link
}
// Link records information about a URL.
Link struct {
Href string
Rel string
Type string
}
// Image references an image.
Image struct {
Title string
Href string
URL string
Height uint32
Width uint32
}
// Item represents a single story.
Item struct {
Title string
Summary string
Content string
Categories []string
Links []*Link
Date time.Time
Image *Image
ID string
Enclosures []*Enclosure
// When items are stored, they are
// marked as unread (Read is false).
// This can be used by aggregators
// to track when the user has read
// the item.
Read bool
}
// Enclosure references an external link.
Enclosure struct {
URL string
Type string
Length uint
}
)