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 ¶
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 ¶
NewClient uses http.DefaultClient when httpClient is nil.
func (*Client) JobDetail ¶
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 JobDetailResponse ¶
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
}
Click to show internal directories.
Click to hide internal directories.