repository

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrorSourceNotFound = errors.New("source not found")
)

Functions

This section is empty.

Types

type ArticleRepository

type ArticleRepository struct {
	// contains filtered or unexported fields
}

func NewArticleRepository

func NewArticleRepository(db *pgxpool.Pool) *ArticleRepository

func (*ArticleRepository) AllNotPosted

func (a *ArticleRepository) AllNotPosted(ctx context.Context, since time.Time, limit uint64) ([]*models.Article, error)

func (*ArticleRepository) MarkPosted

func (a *ArticleRepository) MarkPosted(ctx context.Context, id int64) error

func (*ArticleRepository) Store

func (a *ArticleRepository) Store(ctx context.Context, article models.Article) error

type SourceRepository

type SourceRepository struct {
	// contains filtered or unexported fields
}

func NewSourceRepository

func NewSourceRepository(db *pgxpool.Pool) *SourceRepository

func (*SourceRepository) Add

func (s *SourceRepository) Add(ctx context.Context, source models.Source) (int64, error)

func (*SourceRepository) Delete

func (s *SourceRepository) Delete(ctx context.Context, id int64) error

func (*SourceRepository) SourceByID

func (s *SourceRepository) SourceByID(ctx context.Context, id int64) (*models.Source, error)

func (*SourceRepository) Sources

func (s *SourceRepository) Sources(ctx context.Context) ([]*models.Source, error)

Jump to

Keyboard shortcuts

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