repo

package
v0.0.0-...-95c851e Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: LGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article interface {
	ForUser(content.User, ...content.QueryOpt) ([]content.Article, error)

	All(...content.QueryOpt) ([]content.Article, error)

	Count(content.User, ...content.QueryOpt) (int64, error)
	IDs(content.User, ...content.QueryOpt) ([]content.ArticleID, error)

	Read(bool, content.User, ...content.QueryOpt) error
	Favor(bool, content.User, ...content.QueryOpt) error

	RemoveStaleUnreadRecords() error
}

Article allows fetching and manipulating content.Article objects

type Extract

type Extract interface {
	Get(content.Article) (content.Extract, error)
	Update(content.Extract) error
}

Extract allows fetching and manipulating content.Extract objects

type Feed

type Feed interface {
	Get(content.FeedID, content.User) (content.Feed, error)
	FindByLink(link string) (content.Feed, error)

	ForUser(content.User) ([]content.Feed, error)
	ForTag(content.Tag, content.User) ([]content.Feed, error)
	All() ([]content.Feed, error)

	IDs() ([]content.FeedID, error)
	Unsubscribed() ([]content.Feed, error)

	Update(*content.Feed) ([]content.Article, error)
	Delete(content.Feed) error

	Users(content.Feed) ([]content.User, error)
	AttachTo(content.Feed, content.User) error
	DetachFrom(content.Feed, content.User) error

	SetUserTags(content.Feed, content.User, []*content.Tag) error
}

Feed allows fetching and manipulating content.Feed objects

type Scores

type Scores interface {
	Get(content.Article) (content.Scores, error)
	Update(content.Scores) error
}

Scores allows fetching and manipulating content.Scores objects

type Service

type Service interface {
	UserRepo() User
	TagRepo() Tag
	FeedRepo() Feed
	SubscriptionRepo() Subscription
	ArticleRepo() Article
	ExtractRepo() Extract
	ThumbnailRepo() Thumbnail
	ScoresRepo() Scores
}

Service provices access to the different content repositories.

type Subscription

type Subscription interface {
	Get(content.Feed) (content.Subscription, error)
	All() ([]content.Subscription, error)

	Update(content.Subscription) error
}

Subscription allows fetching and manipulating content.Subscription objects

type Tag

type Tag interface {
	Get(content.TagID, content.User) (content.Tag, error)

	ForUser(content.User) ([]content.Tag, error)
	ForFeed(content.Feed, content.User) ([]content.Tag, error)

	FeedIDs(content.Tag, content.User) ([]content.FeedID, error)
}

Tag allows fetching and manipulating content.Tag objects

type Thumbnail

type Thumbnail interface {
	Get(content.Article) (content.Thumbnail, error)
	Update(content.Thumbnail) error
}

Thumbnail allows fetching and manipulating content.Thumbnail objects

type User

type User interface {
	Get(content.Login) (content.User, error)
	All() ([]content.User, error)
	Update(content.User) error
	Delete(content.User) error

	FindByMD5([]byte) (content.User, error)
}

User allows manipulating content.User objects

Directories

Path Synopsis
Package mock_repo is a generated GoMock package.
Package mock_repo is a generated GoMock package.
sql
db

Jump to

Keyboard shortcuts

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