First version of web UI

This commit is contained in:
Senad Uka
2022-02-13 05:12:49 +01:00
parent a040320827
commit f6e90deebd
9 changed files with 274 additions and 34 deletions

View File

@@ -1,5 +1,7 @@
package model
import "time"
type ScrapedArticle struct {
Title string
Content string
@@ -8,6 +10,26 @@ type ScrapedArticle struct {
SourceId int
}
type DisplayArticle struct {
ID int
Title string
Content string
Slug string
OriginalUrl string
SourceId int
CreatedAt time.Time
FormatedCreatedAt string
SourceName string
}
const (
KlixSource = 1
)
func SourceName(sourceId int) string {
switch sourceId {
case KlixSource:
return "klix"
}
return "starenovine"
}