votingprecincts

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        = "VOTING-PRECINCTS"
	VotingPrecinctsURL = "https://opendata.arcgis.com/datasets/ca0f4261673541d798551f5cddc54bd6_1.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) StoreVotingPrecincts

func (r *Repo) StoreVotingPrecincts(precincts *VotingPrecincts) error

type VotingPrecincts

type VotingPrecincts struct {
	Features *geojson.FeatureCollection
}

func ParseVotingPrecincts

func ParseVotingPrecincts(encoded []byte) (*VotingPrecincts, error)

type VotingPrecinctsScraper

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

func NewScraper

func NewScraper() *VotingPrecinctsScraper

func (*VotingPrecinctsScraper) Configure

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

func (*VotingPrecinctsScraper) EnqueueJobs

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

func (*VotingPrecinctsScraper) HandleResponse

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

func (*VotingPrecinctsScraper) MakeRequest

func (s *VotingPrecinctsScraper) 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