scrape

package
v0.0.0-...-daae6f8 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package scrape defines the Scraper interface for extracting job offer data from external sources. Implementations accept a query and return structured offer parameters for database insertion. Includes a mock implementation for testing.

Index

Constants

This section is empty.

Variables

View Source
var (
	Mock          = &mock{}
	MockWithErr   = &mock{mockErr: fmt.Errorf("error")}
	MockWithDelay = &mock{delay: 150 * time.Millisecond}
	MockList      = List{"Mock": Mock}
)

Functions

This section is empty.

Types

type List

type List map[string]Scraper

List links the name of the scraper to its implementation.

func New

func New(l *slog.Logger) List

New returns a list of all available scrapers.

type Scraper

type Scraper interface {
	Scrape(context.Context, *db.GetQueryScraperRow) ([]db.CreateOfferParams, error)
}

Scraper defines the interface expected from all the scrapers.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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