backend

package
v0.0.0-...-54413c5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SupportedBackendList = "sqlite"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type StorageBackend

type StorageBackend interface {
	ListGroups() ([]models.Group, error)
	ListGroupsByPattern(pattern string) ([]models.Group, error)
	GetGroup(groupName string) (models.Group, error)
	GetNewGroupsSince(timestamp int64) ([]models.Group, error)
	GetArticlesCount(g *models.Group) (int, error)
	GetGroupLowWaterMark(g *models.Group) (int, error)
	GetGroupHighWaterMark(g *models.Group) (int, error)
	SaveArticle(article models.Article, groups []string) error
	GetArticle(messageID string) (models.Article, error)
	GetArticleByNumber(g *models.Group, num int) (models.Article, error)
	GetArticleNumbers(g *models.Group, low, high int64) ([]int64, error)
	GetNewArticlesSince(timestamp int64) ([]string, error)
	GetLastArticleByNum(g *models.Group, a *models.Article) (models.Article, error)
	GetNextArticleByNum(g *models.Group, a *models.Article) (models.Article, error)
	GetArticlesByRange(g *models.Group, low, high int64) ([]models.Article, error)
	GetNewThreads(g *models.Group, perPage int, pageNum int) ([]int, error)
	GetThread(g *models.Group, threadNum int) ([]int, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL