Updates the archive generation to support the new folder structure: archives/<digest-slug>/<date>.html. Changes: - Updated 'OverviewTemplateData' to include 'DigestTitle' and 'DigestSlug'. - Updated 'ArchiveService' to use 'DigestSlug' in file paths. - Updated 'DigestService', 'View', and 'Processor' to propagate digest title/slug. - Updated tests to match new structure and signatures.
101 lines
1.7 KiB
Go
101 lines
1.7 KiB
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type PrimaryGroup struct {
|
|
ID int64
|
|
Title string
|
|
Entries []*Entry
|
|
}
|
|
|
|
type Entry struct {
|
|
ID int64
|
|
Title string
|
|
URL string
|
|
SiteURL string
|
|
Content string
|
|
FeedID int64
|
|
FeedTitle string
|
|
GroupID int64
|
|
GroupTitle string
|
|
CommentsURL string
|
|
Date time.Time
|
|
}
|
|
|
|
type Feed struct {
|
|
ID int64
|
|
Title string
|
|
Description string
|
|
}
|
|
|
|
type Category struct {
|
|
ID int64
|
|
Title string
|
|
Description string
|
|
}
|
|
|
|
type FeedIcon struct {
|
|
FeedID int64
|
|
Data string
|
|
}
|
|
|
|
type OverviewTemplateData struct {
|
|
DigestTitle string
|
|
DigestSlug string
|
|
Entries []*Entry
|
|
GeneratedDate time.Time
|
|
FeedIcons []*FeedIcon
|
|
EntryGroups []*EntryGroup
|
|
PrimaryGroups []*PrimaryGroupDigestData
|
|
TotalEntries int
|
|
TotalFeeds int
|
|
MinifluxHost string
|
|
DigestHost string
|
|
}
|
|
|
|
type EntryGroup struct {
|
|
Title string
|
|
Summary string
|
|
Entries []*Entry
|
|
Slug string
|
|
TotalEntries int
|
|
TotalFeeds int
|
|
}
|
|
|
|
type GroupTemplateData struct {
|
|
Title string
|
|
Summary string
|
|
Entries []*Entry
|
|
GeneratedDate time.Time
|
|
FeedIcons []*FeedIcon
|
|
MinifluxHost string
|
|
}
|
|
|
|
type GroupedEntriesTemplateData struct {
|
|
EntryGroup *EntryGroup
|
|
GeneratedDate time.Time
|
|
FeedIcons []*FeedIcon
|
|
MinifluxHost string
|
|
}
|
|
|
|
type PrimaryGroupDigestData struct {
|
|
ID int64
|
|
Title string
|
|
Slug string
|
|
SubGroups []*EntryGroup
|
|
Summary string
|
|
TotalEntries int
|
|
TotalFeeds int
|
|
}
|
|
|
|
type GroupedDigestPageData struct {
|
|
PrimaryGroup *PrimaryGroupDigestData
|
|
FeedIcons []*FeedIcon
|
|
MinifluxHost string
|
|
GeneratedDate time.Time
|
|
TotalEntries int
|
|
TotalFeeds int
|
|
DigestHost string
|
|
} |