refac: better error handling & moved IsOnline logic to cleaner place

This commit is contained in:
Floriansylvain
2025-12-22 00:59:36 +01:00
parent b50efae8a8
commit 5282770caa
6 changed files with 120 additions and 46 deletions
@@ -1,6 +1,11 @@
package article
type Filters struct {
IsOnline *bool
}
type Repository interface {
FindByFilters(filters Filters) ([]Article, error)
Get(id uint32) (Article, error)
GetByName(name string) (Article, error)
GetAll() []Article