google

package
v0.16.2 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package google reads job listings and details from the public Google Careers site.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMockServer

func NewMockServer() *httptest.Server

NewMockServer returns an httptest.Server that mimics the Google Careers site with canned fixture responses, so tests never hit the real site. The caller owns the server and must Close it.

Types

type Client

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

func NewClient

func NewClient(baseURL string, httpClient *http.Client) *Client

NewClient uses http.DefaultClient when httpClient is nil.

func (*Client) JobDetail

func (c *Client) JobDetail(ctx context.Context, jobID string) (*JobDetailResponse, error)

JobDetail expects a Job.ID returned by Client.Jobs. It returns an error for an empty ID or an unrecognized detail page.

func (*Client) Jobs

func (c *Client) Jobs(ctx context.Context, req *JobsRequest) (*JobsResponse, error)

Jobs returns summaries whose Job.ID values are accepted by Client.JobDetail.

type Job

type Job struct {
	ID                    string
	Title                 string
	Company               string
	Location              string
	Remote                bool
	ExperienceLevel       string
	MinimumQualifications []string
}

type JobDetailResponse

type JobDetailResponse struct {
	ID               string
	Title            string
	Company          string
	Location         string
	Remote           bool
	About            string
	Qualifications   string
	Responsibilities string
}

type JobsRequest

type JobsRequest struct {
	Query          string
	Locations      []string
	HasRemote      bool
	TargetLevels   []string
	Skills         string
	Degrees        []string
	EmploymentType []string
	Companies      []string
	SortBy         string
	Page           int
}

JobsRequest treats Page as one-based; zero leaves pagination to the site default.

type JobsResponse

type JobsResponse struct {
	Jobs []Job
}

Jump to

Keyboard shortcuts

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