Documentation ¶
Index ¶
- Constants
- type Repo
- type Restaurants
- type RestaurantsScraper
- func (s *RestaurantsScraper) Configure(pool *pgxpool.Pool) (err error)
- func (s *RestaurantsScraper) EnqueueJobs() (jobs []infra.Job, err error)
- func (s *RestaurantsScraper) HandleResponse(j infra.Job, resp *http.Response, httpErr error) (*infra.Job, error)
- func (s *RestaurantsScraper) MakeRequest(j infra.Job) (*http.Request, error)
Constants ¶
View Source
const ( ScraperName = "RESTAURANTS" RestaurantsURL = "https://opendata.arcgis.com/datasets/62501c695c614d1c99aaf2b113fca257_0.geojson" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repo ¶
type Repo struct {
// contains filtered or unexported fields
}
func (*Repo) StoreRestaurantss ¶
func (r *Repo) StoreRestaurantss(restaurants *Restaurants) error
type Restaurants ¶
type Restaurants struct {
Features *geojson.FeatureCollection
}
func ParseRestaurants ¶
func ParseRestaurants(encoded []byte) (*Restaurants, error)
type RestaurantsScraper ¶
type RestaurantsScraper struct {
// contains filtered or unexported fields
}
func NewScraper ¶
func NewScraper() *RestaurantsScraper
func (*RestaurantsScraper) Configure ¶
func (s *RestaurantsScraper) Configure(pool *pgxpool.Pool) (err error)
func (*RestaurantsScraper) EnqueueJobs ¶
func (s *RestaurantsScraper) EnqueueJobs() (jobs []infra.Job, err error)
func (*RestaurantsScraper) HandleResponse ¶
func (*RestaurantsScraper) MakeRequest ¶
Click to show internal directories.
Click to hide internal directories.