Refactor folder structure
This commit is contained in:
parent
7e9a205d53
commit
c7cca02ca7
30 changed files with 610 additions and 933 deletions
32
pkg/models/models.go
Normal file
32
pkg/models/models.go
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
package models
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/TheLovinator1/FeedVault/pkg/stats"
|
||||
)
|
||||
|
||||
type TemplateData struct {
|
||||
Title string
|
||||
Description string
|
||||
Keywords string
|
||||
Author string
|
||||
CanonicalURL string
|
||||
FeedCount int
|
||||
DatabaseSize string
|
||||
Request *http.Request
|
||||
ParseErrors []ParseResult
|
||||
}
|
||||
|
||||
type ParseResult struct {
|
||||
FeedURL string
|
||||
Msg string
|
||||
IsError bool
|
||||
}
|
||||
|
||||
func (d *TemplateData) GetDatabaseSizeAndFeedCount() {
|
||||
// TODO: Get the feed count from the database
|
||||
// TODO: Add amount of entries
|
||||
// TODO: Add amount of users
|
||||
d.DatabaseSize = stats.GetDBSize()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue