storage

package
v0.0.0-...-23b7d5e Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticlePostgresStorage

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

func NewArticleStorage

func NewArticleStorage(db *sqlx.DB) *ArticlePostgresStorage

func (*ArticlePostgresStorage) AllNotPosted

func (s *ArticlePostgresStorage) AllNotPosted(ctx context.Context, since time.Time, limit uint64) ([]model.Article, error)

func (*ArticlePostgresStorage) MarkAsPosted

func (s *ArticlePostgresStorage) MarkAsPosted(ctx context.Context, article model.Article) error

func (*ArticlePostgresStorage) Store

func (s *ArticlePostgresStorage) Store(ctx context.Context, article model.Article) error

type SourcePostgresStorage

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

func NewSourceStorage

func NewSourceStorage(db *sqlx.DB) *SourcePostgresStorage

func (*SourcePostgresStorage) Add

func (s *SourcePostgresStorage) Add(ctx context.Context, source model.Source) (int64, error)

func (*SourcePostgresStorage) Delete

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

func (*SourcePostgresStorage) SetPriority

func (s *SourcePostgresStorage) SetPriority(ctx context.Context, id int64, priority int) error

func (*SourcePostgresStorage) SourceByID

func (s *SourcePostgresStorage) SourceByID(ctx context.Context, id int64) (*model.Source, error)

func (*SourcePostgresStorage) Sources

func (s *SourcePostgresStorage) Sources(ctx context.Context) ([]model.Source, error)

Jump to

Keyboard shortcuts

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