| author | 2026-05-02 22:08:49 +0700 | |
|---|---|---|
| committer | 2026-05-02 22:08:49 +0700 | |
| commit | 3efa6ed24713658af855c0ca9504f3e089342182 (patch) | |
| tree | e283f9f8e6bfc833b57f0b108c65e0dbc0bf8b28 /internal/blog/index.go | |
| parent | 06b584d66991cc8f0aefce685b65291ad9a59901 (diff) | |
| download | web-3efa6ed24713658af855c0ca9504f3e089342182.tar.gz web-3efa6ed24713658af855c0ca9504f3e089342182.zip | |
feat: move from b2 to s3 for blog pages & facts
feat: use centralized index.json for blog pages, keep paginator as fallback
feat: multithreaded paginator
Diffstat (limited to 'internal/blog/index.go')
| -rw-r--r-- | internal/blog/index.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/internal/blog/index.go b/internal/blog/index.go new file mode 100644 index 0000000..861a90e --- /dev/null +++ b/internal/blog/index.go @@ -0,0 +1,32 @@ +package blog + +import "time" + +const IndexFileName = "index.json" + +const IndexSchemaVersion = 1 + +type IndexEntry struct { + Link string `json:"link"` + ModifiedTime time.Time `json:"modifiedTime"` + Title string `json:"title"` + ShortDescription string `json:"shortDescription"` + ActionDate string `json:"actionDate"` + PublishedTime time.Time `json:"publishedTime"` + Thumbnail string `json:"thumbnail"` + Tags []string `json:"tags"` + Geolocation string `json:"geolocation"` + Medley string `json:"medley,omitempty"` + MedleyPart int `json:"medleyPart,omitempty"` +} + +type IndexCategory struct { + GeneratedAt time.Time `json:"generatedAt"` + Pages []IndexEntry `json:"pages"` +} + +type Index struct { + SchemaVersion int `json:"schemaVersion"` + GeneratedAt time.Time `json:"generatedAt"` + Categories map[string]IndexCategory `json:"categories"` +} |