policedistricts

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        = "POLICE-DISTRICTS"
	PoliceDistrictsURL = "https://opendata.arcgis.com/datasets/140759858aa14bb6a5a2fe099ccf4c07_0.geojson"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PoliceDistricts

type PoliceDistricts struct {
	Features *geojson.FeatureCollection
}

func ParsePoliceDistricts

func ParsePoliceDistricts(encoded []byte) (*PoliceDistricts, error)

type PoliceDistrictsScraper

type PoliceDistrictsScraper struct {
	// contains filtered or unexported fields
}

func NewScraper

func NewScraper() *PoliceDistrictsScraper

func (*PoliceDistrictsScraper) Configure

func (s *PoliceDistrictsScraper) Configure(pool *pgxpool.Pool) (err error)

func (*PoliceDistrictsScraper) EnqueueJobs

func (s *PoliceDistrictsScraper) EnqueueJobs() ([]infra.Job, error)

func (*PoliceDistrictsScraper) HandleResponse

func (s *PoliceDistrictsScraper) HandleResponse(j infra.Job, resp *http.Response, httpErr error) (*infra.Job, error)

func (*PoliceDistrictsScraper) MakeRequest

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

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

func NewRepo

func NewRepo(conn *pgxpool.Pool) *Repo

func (*Repo) StorePoliceDistricts

func (r *Repo) StorePoliceDistricts(districts *PoliceDistricts) error

Jump to

Keyboard shortcuts

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