diff options
Diffstat (limited to 'content/item.go')
-rw-r--r-- | content/item.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/content/item.go b/content/item.go index 7b25b14..f4a5489 100644 --- a/content/item.go +++ b/content/item.go @@ -7,3 +7,18 @@ type Item struct { 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 +} |