restaurants

package
v0.0.0-...-268a1c9 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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 NewRepo

func NewRepo(conn *pgxpool.Pool) *Repo

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 (s *RestaurantsScraper) HandleResponse(j infra.Job, resp *http.Response, httpErr error) (*infra.Job, error)

func (*RestaurantsScraper) MakeRequest

func (s *RestaurantsScraper) MakeRequest(j infra.Job) (*http.Request, error)

Jump to

Keyboard shortcuts

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