Documentation ¶
Index ¶
- Variables
- func CheckPassword(password string, hashedPassword []byte) error
- func Client() *sql.DB
- func Close()
- func DeleteSource(ctx context.Context, id string) error
- func GetAllSources(ctx context.Context) ([]domain.Source, error)
- func GetAllSourcesForOwner(ctx context.Context, ownerID string) ([]domain.Source, error)
- func GetArticle(ctx context.Context, id string) (*domain.Article, error)
- func GetArticleByURL(ctx context.Context, url string) (*domain.Article, error)
- func GetArticlesBySourceAndTime(ctx context.Context, sourceID string, start, end time.Time) ([]domain.Article, error)
- func GetArticlesByTime(ctx context.Context, start, end time.Time) ([]domain.Article, error)
- func GetArticlesForOwner(ctx context.Context, ownerID string, start, end time.Time) ([]domain.Article, []domain.Source, error)
- func GetArticlesForSource(ctx context.Context, link string) ([]domain.Article, error)
- func GetEdition(ctx context.Context, id string) (*domain.Edition, error)
- func GetEditionForTime(ctx context.Context, t time.Time, allowRecent bool) (*domain.Edition, error)
- func GetLastFetchTimeForSource(ctx context.Context, sourceID int) (time.Time, error)
- func GetSource(ctx context.Context, id string) (*domain.Source, error)
- func GetSources(ctx context.Context, ownerID string) ([]domain.Source, error)
- func GetUser(ctx context.Context, id string) (*domain.User, error)
- func GetUserByName(ctx context.Context, name string) (*domain.User, error)
- func HashPassword(password string) ([]byte, error)
- func Init(ctx context.Context) error
- func InitSources(ctx context.Context) error
- func SearchInCache(ctx context.Context, query string) ([]domain.Article, error)
- func SearchInSQLite(ctx context.Context, query string) ([]domain.Article, error)
- func SetArticle(ctx context.Context, a *domain.Article) error
- func SetEdition(ctx context.Context, e *domain.Edition) error
- func SetLastFetchTimeForSource(ctx context.Context, sourceID int, lastFetchTime time.Time) error
- func SetSource(ctx context.Context, s *domain.Source) error
- func SetUser(ctx context.Context, u *domain.User) error
- type Analytics
- type Article
- type Edition
- type Item
- type Source
- type User
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ArticleCache *feedCache
)
Functions ¶
func CheckPassword ¶
func GetAllSourcesForOwner ¶
func GetArticleByURL ¶
func GetArticlesByTime ¶
func GetArticlesForOwner ¶
func GetArticlesForSource ¶
func GetEditionForTime ¶
func GetLastFetchTimeForSource ¶
GetLastFetchTimeForSource fetches the last fetch time for a given source from the database
func HashPassword ¶
func InitSources ¶
func SearchInCache ¶
func SearchInSQLite ¶
func SetLastFetchTimeForSource ¶
SetLastFetchTimeForSource updates the last fetch time for a given source in the database
Types ¶
type Article ¶
type Article struct { ID string `db:"id"` Title string `db:"title"` Description string `db:"description"` CompressedContent []byte `db:"compressed_content"` ImageURL string `db:"image_url"` Link string `db:"link"` Author string `db:"author"` SourceID int64 `db:"source_id"` Timestamp time.Time `db:"timestamp"` Ts string `db:"ts"` Layout string `db:"layout"` }
type Edition ¶
type Edition struct { ID string `db:"id"` Name string `db:"name"` Date string `db:"date"` StartTime time.Time `db:"start_time"` EndTime time.Time `db:"end_time"` Created time.Time `db:"created"` Sources []Source `db:"sources"` Articles []Article `db:"articles"` Categories []string `db:"categories"` Metadata map[string]string `db:"metadata"` }
Click to show internal directories.
Click to hide internal directories.