blob: f4a54898ef70355411ee1601561259cb71d6284f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
package content
// Item should only be embedded into content type structs.
type Item struct {
ID int `json:"id"`
Slug string `json:"slug"`
Timestamp int64 `json:"timestamp"`
Updated int64 `json:"updated"`
}
// Time partially implements the Sortable interface
func (i Item) Time() int64 {
return i.Timestamp
}
// Touch partially implements the Sortable interface
func (i Item) Touch() int64 {
return i.Updated
}
// ContentID partially implements the Sortable interface
func (i Item) ContentID() int {
return i.ID
}
|