feat: Sites feature backend
This commit is contained in:
1 parent
45fcbd890d
commit
a11338094e
98 files changed
+5365
-214
No files matched your search
@@ -30,6 +30,7 @@ func DefaultSort() Sort {
|
||||
|
||||
type Filters struct {
|
||||
IsOnline *bool
|
||||
SiteID *uint32
|
||||
Page int
|
||||
Size int
|
||||
Q string
|
||||
@@ -37,6 +38,11 @@ type Filters struct {
|
||||
Sort Sort
|
||||
}
|
||||
|
||||
type Update struct {
|
||||
Body *string
|
||||
SiteID *uint32
|
||||
}
|
||||
|
||||
type Counts struct {
|
||||
All int `json:"all"`
|
||||
Online int `json:"online"`
|
||||
@@ -57,6 +63,7 @@ type Repository interface {
|
||||
GetAll() []Article
|
||||
Create(post Article) (Article, error)
|
||||
UpdateBody(id uint32, body string) (Article, error)
|
||||
Update(id uint32, update Update) (Article, error)
|
||||
UpdateIsOnline(id uint32, isOnline bool) (Article, error)
|
||||
Delete(id uint32) error
|
||||
FindByBodyContaining(filename string) ([]Article, error)
|
||||
|
||||
Reference in new issue
Block a user