2022-01-19 19:51:08 +00:00
|
|
|
package backend
|
|
|
|
|
|
|
|
import "github.com/ChronosX88/yans/internal/models"
|
|
|
|
|
|
|
|
const (
|
|
|
|
SupportedBackendList = "sqlite"
|
|
|
|
)
|
|
|
|
|
|
|
|
type StorageBackend interface {
|
|
|
|
ListGroups() ([]models.Group, error)
|
2022-01-20 21:29:58 +00:00
|
|
|
ListGroupsByPattern(pattern string) ([]models.Group, error)
|
2022-01-25 16:27:58 +00:00
|
|
|
GetGroup(groupName string) (models.Group, error)
|
2022-01-19 19:51:08 +00:00
|
|
|
GetArticlesCount(g models.Group) (int, error)
|
2022-01-19 21:44:27 +00:00
|
|
|
GetGroupLowWaterMark(g models.Group) (int, error)
|
|
|
|
GetGroupHighWaterMark(g models.Group) (int, error)
|
2022-01-19 19:51:08 +00:00
|
|
|
}
|