yans/internal/backend/storage_backend.go
2022-01-25 19:27:58 +03:00

17 lines
447 B
Go

package backend
import "github.com/ChronosX88/yans/internal/models"
const (
SupportedBackendList = "sqlite"
)
type StorageBackend interface {
ListGroups() ([]models.Group, error)
ListGroupsByPattern(pattern string) ([]models.Group, error)
GetGroup(groupName string) (models.Group, error)
GetArticlesCount(g models.Group) (int, error)
GetGroupLowWaterMark(g models.Group) (int, error)
GetGroupHighWaterMark(g models.Group) (int, error)
}