James Tombleson
11892b9a7b
* starting the ffxiv reader * working on getting the standard interface for sources based on the work for ffxiv * got more of ffxiv working and updated tests * Author and Description can be extracted and validated with tests * added uuid package * ffxiv core logic is working and testes updated to reflect it. * Updated the scheduler with the current sources and moved them from main * updated reddit to allow modern go to talk to the endpoint with a debug flag * gave the func a better name * cleaned up main * Moved cache to its own package and updated tests" * moved config to its own package and added basic tests * updated imports * minor update" * interface update and cache model update * updated the scheduler for basic services. No DB calls yet * updated db calls * bypassed the reddit test as its flaky in github
24 lines
590 B
Go
24 lines
590 B
Go
package interfaces
|
|
|
|
import (
|
|
"github.com/go-rod/rod"
|
|
"github.com/mmcdole/gofeed"
|
|
)
|
|
|
|
type Sources interface {
|
|
CheckSource() error
|
|
PullFeed() (*gofeed.Feed, error)
|
|
|
|
GetBrowser() *rod.Browser
|
|
GetPage(parser *rod.Browser, url string) *rod.Page
|
|
|
|
ExtractThumbnail(page *rod.Page) (string, error)
|
|
ExtractPubDate(page *rod.Page) (string, error)
|
|
ExtractDescription(page *rod.Page) (string, error)
|
|
ExtractAuthor(page *rod.Page) (string, error)
|
|
ExtractAuthorImage(page *rod.Page) (string, error)
|
|
ExtractTags(page *rod.Page) (string, error)
|
|
ExtractTitle(page *rod.Page) (string, error)
|
|
}
|
|
|