Documentation
¶
Index ¶
- Variables
- type ArticleRepository
- type SourceRepository
- func (s *SourceRepository) Add(ctx context.Context, source models.Source) (int64, error)
- func (s *SourceRepository) Delete(ctx context.Context, id int64) error
- func (s *SourceRepository) SourceByID(ctx context.Context, id int64) (*models.Source, error)
- func (s *SourceRepository) Sources(ctx context.Context) ([]*models.Source, error)
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 (*ArticleRepository) MarkPosted ¶
func (a *ArticleRepository) MarkPosted(ctx context.Context, id int64) error
type SourceRepository ¶
type SourceRepository struct {
// contains filtered or unexported fields
}
func NewSourceRepository ¶
func NewSourceRepository(db *pgxpool.Pool) *SourceRepository
func (*SourceRepository) Delete ¶
func (s *SourceRepository) Delete(ctx context.Context, id int64) error
func (*SourceRepository) SourceByID ¶
Click to show internal directories.
Click to hide internal directories.