readeef: github.com/urandom/readeef/content/repo Index | Files | Directories

package repo

import "github.com/urandom/readeef/content/repo"

Index

Package Files

article.go extract.go feed.go scores.go service.go subscription.go tag.go thumbnail.go user.go

type Article Uses

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 Uses

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

Extract allows fetching and manipulating content.Extract objects

type Feed Uses

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 Uses

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

Scores allows fetching and manipulating content.Scores objects

type Service Uses

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 Uses

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 Uses

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 Uses

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

Thumbnail allows fetching and manipulating content.Thumbnail objects

type User Uses

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

PathSynopsis
eventable
logging
mock_repoPackage mock_repo is a generated GoMock package.
sql
sql/db
sql/db/base
sql/db/postgres
sql/db/sqlite3

Package repo imports 1 packages (graph) and is imported by 13 packages. Updated 2018-09-27. Refresh now. Tools for package owners.