workable

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: 31 Imported by: 0

Documentation

Overview

Package workable provides a public job board API client and curated company roster for Workable-hosted careers pages (apply.workable.com).

Quirks observed live (2026-07-18):

  • Search is POST /api/v3/accounts/{account}/jobs with a fixed page size of 10 and cursor pagination via nextPage → body token. There is no limit.
  • Location objects frequently ship null region (and empty city) even when country/city are set; the OpenAPI schema marks those fields nullable.
  • Facet location display is account-inconsistent — present for blueground, absent on zego — so consumers rebuild labels from structured fields.
  • Cloudflare 403-blocks some client User-Agents (Python-urllib observed); Go's default UA and curl pass.

Code generated by ogen, DO NOT EDIT.

Index

Constants

View Source
const MockPage2Token = "WzE3ODEwNDk2MDAwMDAsNTg0NDk1Nl0="

MockPage2Token is the nextPage cursor inside testdata/jobs_rsp.json; a search body carrying it is answered with testdata/jobs_page2_rsp.json.

View Source
const MockUnknownCompany = "openings-mcp-no-such-account"

MockUnknownCompany is an account deliberately absent from any roster, matching the quirk captured in testdata/jobs_unknown_company_rsp.txt: an unknown account 404s with a text/plain body, not JSON.

Variables

View Source
var Companies = mustLoadCompanies()

Companies holds every confirmed Workable company, sorted by company name.

View Source
var CompaniesByAccount = buildAccountIndex(Companies)

CompaniesByAccount looks up a confirmed company by account subdomain. Keys are lowercased, so callers must lowercase their input before indexing.

Functions

func NewMockServer

func NewMockServer() *httptest.Server

NewMockServer returns an httptest.Server serving canned Workable job board API fixture responses, so tests never hit the live API. All fixtures were captured from Blueground's live board (see testdata/*.hurl). The caller owns the server and must Close it.

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) GetJob

func (c *Client) GetJob(ctx context.Context, params GetJobParams) (GetJobRes, error)

GetJob invokes getJob operation.

Get one published job with its full posting body.

GET /api/v2/accounts/{account}/jobs/{shortcode}

func (*Client) ListJobFilters

func (c *Client) ListJobFilters(ctx context.Context, params ListJobFiltersParams) (ListJobFiltersRes, error)

ListJobFilters invokes listJobFilters operation.

The value domains for SearchRequest's filter fields, including the numeric department ids that the `department` filter requires.

GET /api/v3/accounts/{account}/jobs/filters

func (*Client) SearchJobs

func (c *Client) SearchJobs(ctx context.Context, request *SearchRequest, params SearchJobsParams) (SearchJobsRes, error)

SearchJobs invokes searchJobs operation.

Search an account's published jobs.

POST /api/v3/accounts/{account}/jobs

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type FacetDepartment

type FacetDepartment struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
	// The id set (self plus descendants) the search body's `department` filter should send to cover this
	// department.
	Filter   []int     `json:"filter"`
	Count    OptInt    `json:"count"`
	ParentID OptNilInt `json:"parent_id"`
}

Ref: #/components/schemas/FacetDepartment

func (*FacetDepartment) Decode

func (s *FacetDepartment) Decode(d *jx.Decoder) error

Decode decodes FacetDepartment from json.

func (*FacetDepartment) Encode

func (s *FacetDepartment) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*FacetDepartment) GetCount

func (s *FacetDepartment) GetCount() OptInt

GetCount returns the value of Count.

func (*FacetDepartment) GetFilter

func (s *FacetDepartment) GetFilter() []int

GetFilter returns the value of Filter.

func (*FacetDepartment) GetID

func (s *FacetDepartment) GetID() int

GetID returns the value of ID.

func (*FacetDepartment) GetName

func (s *FacetDepartment) GetName() string

GetName returns the value of Name.

func (*FacetDepartment) GetParentID

func (s *FacetDepartment) GetParentID() OptNilInt

GetParentID returns the value of ParentID.

func (*FacetDepartment) MarshalJSON

func (s *FacetDepartment) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FacetDepartment) SetCount

func (s *FacetDepartment) SetCount(val OptInt)

SetCount sets the value of Count.

func (*FacetDepartment) SetFilter

func (s *FacetDepartment) SetFilter(val []int)

SetFilter sets the value of Filter.

func (*FacetDepartment) SetID

func (s *FacetDepartment) SetID(val int)

SetID sets the value of ID.

func (*FacetDepartment) SetName

func (s *FacetDepartment) SetName(val string)

SetName sets the value of Name.

func (*FacetDepartment) SetParentID

func (s *FacetDepartment) SetParentID(val OptNilInt)

SetParentID sets the value of ParentID.

func (*FacetDepartment) UnmarshalJSON

func (s *FacetDepartment) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FacetLocation

type FacetLocation struct {
	Country     OptNilString `json:"country"`
	CountryCode OptNilString `json:"countryCode"`
	Region      OptNilString `json:"region"`
	City        OptNilString `json:"city"`
	Display     OptNilString `json:"display"`
}

Hierarchical: an account lists country-, region-, and city-level entries. `display` (joining the fields the entry carries) is account-inconsistent — present for blueground, absent on every zego entry — so build a label from the structured fields when it's missing. Structured fields can also be null/empty on some accounts. Ref: #/components/schemas/FacetLocation

func (*FacetLocation) Decode

func (s *FacetLocation) Decode(d *jx.Decoder) error

Decode decodes FacetLocation from json.

func (*FacetLocation) Encode

func (s *FacetLocation) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*FacetLocation) GetCity

func (s *FacetLocation) GetCity() OptNilString

GetCity returns the value of City.

func (*FacetLocation) GetCountry

func (s *FacetLocation) GetCountry() OptNilString

GetCountry returns the value of Country.

func (*FacetLocation) GetCountryCode

func (s *FacetLocation) GetCountryCode() OptNilString

GetCountryCode returns the value of CountryCode.

func (*FacetLocation) GetDisplay

func (s *FacetLocation) GetDisplay() OptNilString

GetDisplay returns the value of Display.

func (*FacetLocation) GetRegion

func (s *FacetLocation) GetRegion() OptNilString

GetRegion returns the value of Region.

func (*FacetLocation) MarshalJSON

func (s *FacetLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FacetLocation) SetCity

func (s *FacetLocation) SetCity(val OptNilString)

SetCity sets the value of City.

func (*FacetLocation) SetCountry

func (s *FacetLocation) SetCountry(val OptNilString)

SetCountry sets the value of Country.

func (*FacetLocation) SetCountryCode

func (s *FacetLocation) SetCountryCode(val OptNilString)

SetCountryCode sets the value of CountryCode.

func (*FacetLocation) SetDisplay

func (s *FacetLocation) SetDisplay(val OptNilString)

SetDisplay sets the value of Display.

func (*FacetLocation) SetRegion

func (s *FacetLocation) SetRegion(val OptNilString)

SetRegion sets the value of Region.

func (*FacetLocation) UnmarshalJSON

func (s *FacetLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FiltersResponse

type FiltersResponse struct {
	Locations   []FacetLocation   `json:"locations"`
	Departments []FacetDepartment `json:"departments"`
	Worktypes   []string          `json:"worktypes"`
	Remotes     []bool            `json:"remotes"`
	Workplaces  []string          `json:"workplaces"`
}

Ref: #/components/schemas/FiltersResponse

func (*FiltersResponse) Decode

func (s *FiltersResponse) Decode(d *jx.Decoder) error

Decode decodes FiltersResponse from json.

func (*FiltersResponse) Encode

func (s *FiltersResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*FiltersResponse) GetDepartments

func (s *FiltersResponse) GetDepartments() []FacetDepartment

GetDepartments returns the value of Departments.

func (*FiltersResponse) GetLocations

func (s *FiltersResponse) GetLocations() []FacetLocation

GetLocations returns the value of Locations.

func (*FiltersResponse) GetRemotes

func (s *FiltersResponse) GetRemotes() []bool

GetRemotes returns the value of Remotes.

func (*FiltersResponse) GetWorkplaces

func (s *FiltersResponse) GetWorkplaces() []string

GetWorkplaces returns the value of Workplaces.

func (*FiltersResponse) GetWorktypes

func (s *FiltersResponse) GetWorktypes() []string

GetWorktypes returns the value of Worktypes.

func (*FiltersResponse) MarshalJSON

func (s *FiltersResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FiltersResponse) SetDepartments

func (s *FiltersResponse) SetDepartments(val []FacetDepartment)

SetDepartments sets the value of Departments.

func (*FiltersResponse) SetLocations

func (s *FiltersResponse) SetLocations(val []FacetLocation)

SetLocations sets the value of Locations.

func (*FiltersResponse) SetRemotes

func (s *FiltersResponse) SetRemotes(val []bool)

SetRemotes sets the value of Remotes.

func (*FiltersResponse) SetWorkplaces

func (s *FiltersResponse) SetWorkplaces(val []string)

SetWorkplaces sets the value of Workplaces.

func (*FiltersResponse) SetWorktypes

func (s *FiltersResponse) SetWorktypes(val []string)

SetWorktypes sets the value of Worktypes.

func (*FiltersResponse) UnmarshalJSON

func (s *FiltersResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FiltersResponse) Validate

func (s *FiltersResponse) Validate() error

type GetJobParams

type GetJobParams struct {
	// The account subdomain — the slug from its careers URL, e.g. "blueground" in
	// apply.workable.com/blueground.
	Account string
	// A job's shortcode from a search result.
	Shortcode string
}

GetJobParams is parameters of getJob operation.

type GetJobRes

type GetJobRes interface {
	// contains filtered or unexported methods
}

type Handler

type Handler interface {
	// GetJob implements getJob operation.
	//
	// Get one published job with its full posting body.
	//
	// GET /api/v2/accounts/{account}/jobs/{shortcode}
	GetJob(ctx context.Context, params GetJobParams) (GetJobRes, error)
	// ListJobFilters implements listJobFilters operation.
	//
	// The value domains for SearchRequest's filter fields, including the numeric department ids that the
	// `department` filter requires.
	//
	// GET /api/v3/accounts/{account}/jobs/filters
	ListJobFilters(ctx context.Context, params ListJobFiltersParams) (ListJobFiltersRes, error)
	// SearchJobs implements searchJobs operation.
	//
	// Search an account's published jobs.
	//
	// POST /api/v3/accounts/{account}/jobs
	SearchJobs(ctx context.Context, req *SearchRequest, params SearchJobsParams) (SearchJobsRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type Invoker

type Invoker interface {
	// GetJob invokes getJob operation.
	//
	// Get one published job with its full posting body.
	//
	// GET /api/v2/accounts/{account}/jobs/{shortcode}
	GetJob(ctx context.Context, params GetJobParams) (GetJobRes, error)
	// ListJobFilters invokes listJobFilters operation.
	//
	// The value domains for SearchRequest's filter fields, including the numeric department ids that the
	// `department` filter requires.
	//
	// GET /api/v3/accounts/{account}/jobs/filters
	ListJobFilters(ctx context.Context, params ListJobFiltersParams) (ListJobFiltersRes, error)
	// SearchJobs invokes searchJobs operation.
	//
	// Search an account's published jobs.
	//
	// POST /api/v3/accounts/{account}/jobs
	SearchJobs(ctx context.Context, request *SearchRequest, params SearchJobsParams) (SearchJobsRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type JobDetail

type JobDetail struct {
	ID         int         `json:"id"`
	Shortcode  string      `json:"shortcode"`
	Title      string      `json:"title"`
	Remote     OptBool     `json:"remote"`
	Location   OptLocation `json:"location"`
	Locations  []Location  `json:"locations"`
	State      OptString   `json:"state"`
	IsInternal OptBool     `json:"isInternal"`
	// The account's own requisition code; null when unset.
	Code OptNilString `json:"code"`
	// ISO 8601 timestamp.
	Published OptString `json:"published"`
	// Worktype (full, part, contract, temporary).
	Type     OptString `json:"type"`
	Language OptString `json:"language"`
	// Department names; ids only exist on the filters endpoint.
	Department     []string              `json:"department"`
	AccountUid     OptString             `json:"accountUid"`
	ApprovalStatus OptString             `json:"approvalStatus"`
	Workplace      OptJobDetailWorkplace `json:"workplace"`
	Description    OptString             `json:"description"`
	Requirements   OptString             `json:"requirements"`
	Benefits       OptString             `json:"benefits"`
}

Merged schema. Ref: #/components/schemas/JobDetail

func (*JobDetail) Decode

func (s *JobDetail) Decode(d *jx.Decoder) error

Decode decodes JobDetail from json.

func (*JobDetail) Encode

func (s *JobDetail) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*JobDetail) GetAccountUid

func (s *JobDetail) GetAccountUid() OptString

GetAccountUid returns the value of AccountUid.

func (*JobDetail) GetApprovalStatus

func (s *JobDetail) GetApprovalStatus() OptString

GetApprovalStatus returns the value of ApprovalStatus.

func (*JobDetail) GetBenefits

func (s *JobDetail) GetBenefits() OptString

GetBenefits returns the value of Benefits.

func (*JobDetail) GetCode

func (s *JobDetail) GetCode() OptNilString

GetCode returns the value of Code.

func (*JobDetail) GetDepartment

func (s *JobDetail) GetDepartment() []string

GetDepartment returns the value of Department.

func (*JobDetail) GetDescription

func (s *JobDetail) GetDescription() OptString

GetDescription returns the value of Description.

func (*JobDetail) GetID

func (s *JobDetail) GetID() int

GetID returns the value of ID.

func (*JobDetail) GetIsInternal

func (s *JobDetail) GetIsInternal() OptBool

GetIsInternal returns the value of IsInternal.

func (*JobDetail) GetLanguage

func (s *JobDetail) GetLanguage() OptString

GetLanguage returns the value of Language.

func (*JobDetail) GetLocation

func (s *JobDetail) GetLocation() OptLocation

GetLocation returns the value of Location.

func (*JobDetail) GetLocations

func (s *JobDetail) GetLocations() []Location

GetLocations returns the value of Locations.

func (*JobDetail) GetPublished

func (s *JobDetail) GetPublished() OptString

GetPublished returns the value of Published.

func (*JobDetail) GetRemote

func (s *JobDetail) GetRemote() OptBool

GetRemote returns the value of Remote.

func (*JobDetail) GetRequirements

func (s *JobDetail) GetRequirements() OptString

GetRequirements returns the value of Requirements.

func (*JobDetail) GetShortcode

func (s *JobDetail) GetShortcode() string

GetShortcode returns the value of Shortcode.

func (*JobDetail) GetState

func (s *JobDetail) GetState() OptString

GetState returns the value of State.

func (*JobDetail) GetTitle

func (s *JobDetail) GetTitle() string

GetTitle returns the value of Title.

func (*JobDetail) GetType

func (s *JobDetail) GetType() OptString

GetType returns the value of Type.

func (*JobDetail) GetWorkplace

func (s *JobDetail) GetWorkplace() OptJobDetailWorkplace

GetWorkplace returns the value of Workplace.

func (*JobDetail) MarshalJSON

func (s *JobDetail) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*JobDetail) SetAccountUid

func (s *JobDetail) SetAccountUid(val OptString)

SetAccountUid sets the value of AccountUid.

func (*JobDetail) SetApprovalStatus

func (s *JobDetail) SetApprovalStatus(val OptString)

SetApprovalStatus sets the value of ApprovalStatus.

func (*JobDetail) SetBenefits

func (s *JobDetail) SetBenefits(val OptString)

SetBenefits sets the value of Benefits.

func (*JobDetail) SetCode

func (s *JobDetail) SetCode(val OptNilString)

SetCode sets the value of Code.

func (*JobDetail) SetDepartment

func (s *JobDetail) SetDepartment(val []string)

SetDepartment sets the value of Department.

func (*JobDetail) SetDescription

func (s *JobDetail) SetDescription(val OptString)

SetDescription sets the value of Description.

func (*JobDetail) SetID

func (s *JobDetail) SetID(val int)

SetID sets the value of ID.

func (*JobDetail) SetIsInternal

func (s *JobDetail) SetIsInternal(val OptBool)

SetIsInternal sets the value of IsInternal.

func (*JobDetail) SetLanguage

func (s *JobDetail) SetLanguage(val OptString)

SetLanguage sets the value of Language.

func (*JobDetail) SetLocation

func (s *JobDetail) SetLocation(val OptLocation)

SetLocation sets the value of Location.

func (*JobDetail) SetLocations

func (s *JobDetail) SetLocations(val []Location)

SetLocations sets the value of Locations.

func (*JobDetail) SetPublished

func (s *JobDetail) SetPublished(val OptString)

SetPublished sets the value of Published.

func (*JobDetail) SetRemote

func (s *JobDetail) SetRemote(val OptBool)

SetRemote sets the value of Remote.

func (*JobDetail) SetRequirements

func (s *JobDetail) SetRequirements(val OptString)

SetRequirements sets the value of Requirements.

func (*JobDetail) SetShortcode

func (s *JobDetail) SetShortcode(val string)

SetShortcode sets the value of Shortcode.

func (*JobDetail) SetState

func (s *JobDetail) SetState(val OptString)

SetState sets the value of State.

func (*JobDetail) SetTitle

func (s *JobDetail) SetTitle(val string)

SetTitle sets the value of Title.

func (*JobDetail) SetType

func (s *JobDetail) SetType(val OptString)

SetType sets the value of Type.

func (*JobDetail) SetWorkplace

func (s *JobDetail) SetWorkplace(val OptJobDetailWorkplace)

SetWorkplace sets the value of Workplace.

func (*JobDetail) UnmarshalJSON

func (s *JobDetail) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*JobDetail) Validate

func (s *JobDetail) Validate() error

type JobDetailWorkplace

type JobDetailWorkplace string
const (
	JobDetailWorkplaceOnSite JobDetailWorkplace = "on_site"
	JobDetailWorkplaceHybrid JobDetailWorkplace = "hybrid"
	JobDetailWorkplaceRemote JobDetailWorkplace = "remote"
)

func (JobDetailWorkplace) AllValues

func (JobDetailWorkplace) AllValues() []JobDetailWorkplace

AllValues returns all JobDetailWorkplace values.

func (*JobDetailWorkplace) Decode

func (s *JobDetailWorkplace) Decode(d *jx.Decoder) error

Decode decodes JobDetailWorkplace from json.

func (JobDetailWorkplace) Encode

func (s JobDetailWorkplace) Encode(e *jx.Encoder)

Encode encodes JobDetailWorkplace as json.

func (JobDetailWorkplace) MarshalJSON

func (s JobDetailWorkplace) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (JobDetailWorkplace) MarshalText

func (s JobDetailWorkplace) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*JobDetailWorkplace) UnmarshalJSON

func (s *JobDetailWorkplace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*JobDetailWorkplace) UnmarshalText

func (s *JobDetailWorkplace) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (JobDetailWorkplace) Validate

func (s JobDetailWorkplace) Validate() error

type JobSummary

type JobSummary struct {
	ID         int         `json:"id"`
	Shortcode  string      `json:"shortcode"`
	Title      string      `json:"title"`
	Remote     OptBool     `json:"remote"`
	Location   OptLocation `json:"location"`
	Locations  []Location  `json:"locations"`
	State      OptString   `json:"state"`
	IsInternal OptBool     `json:"isInternal"`
	// The account's own requisition code; null when unset.
	Code OptNilString `json:"code"`
	// ISO 8601 timestamp.
	Published OptString `json:"published"`
	// Worktype (full, part, contract, temporary).
	Type     OptString `json:"type"`
	Language OptString `json:"language"`
	// Department names; ids only exist on the filters endpoint.
	Department     []string               `json:"department"`
	AccountUid     OptString              `json:"accountUid"`
	ApprovalStatus OptString              `json:"approvalStatus"`
	Workplace      OptJobSummaryWorkplace `json:"workplace"`
}

Ref: #/components/schemas/JobSummary

func (*JobSummary) Decode

func (s *JobSummary) Decode(d *jx.Decoder) error

Decode decodes JobSummary from json.

func (*JobSummary) Encode

func (s *JobSummary) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*JobSummary) GetAccountUid

func (s *JobSummary) GetAccountUid() OptString

GetAccountUid returns the value of AccountUid.

func (*JobSummary) GetApprovalStatus

func (s *JobSummary) GetApprovalStatus() OptString

GetApprovalStatus returns the value of ApprovalStatus.

func (*JobSummary) GetCode

func (s *JobSummary) GetCode() OptNilString

GetCode returns the value of Code.

func (*JobSummary) GetDepartment

func (s *JobSummary) GetDepartment() []string

GetDepartment returns the value of Department.

func (*JobSummary) GetID

func (s *JobSummary) GetID() int

GetID returns the value of ID.

func (*JobSummary) GetIsInternal

func (s *JobSummary) GetIsInternal() OptBool

GetIsInternal returns the value of IsInternal.

func (*JobSummary) GetLanguage

func (s *JobSummary) GetLanguage() OptString

GetLanguage returns the value of Language.

func (*JobSummary) GetLocation

func (s *JobSummary) GetLocation() OptLocation

GetLocation returns the value of Location.

func (*JobSummary) GetLocations

func (s *JobSummary) GetLocations() []Location

GetLocations returns the value of Locations.

func (*JobSummary) GetPublished

func (s *JobSummary) GetPublished() OptString

GetPublished returns the value of Published.

func (*JobSummary) GetRemote

func (s *JobSummary) GetRemote() OptBool

GetRemote returns the value of Remote.

func (*JobSummary) GetShortcode

func (s *JobSummary) GetShortcode() string

GetShortcode returns the value of Shortcode.

func (*JobSummary) GetState

func (s *JobSummary) GetState() OptString

GetState returns the value of State.

func (*JobSummary) GetTitle

func (s *JobSummary) GetTitle() string

GetTitle returns the value of Title.

func (*JobSummary) GetType

func (s *JobSummary) GetType() OptString

GetType returns the value of Type.

func (*JobSummary) GetWorkplace

func (s *JobSummary) GetWorkplace() OptJobSummaryWorkplace

GetWorkplace returns the value of Workplace.

func (*JobSummary) MarshalJSON

func (s *JobSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*JobSummary) SetAccountUid

func (s *JobSummary) SetAccountUid(val OptString)

SetAccountUid sets the value of AccountUid.

func (*JobSummary) SetApprovalStatus

func (s *JobSummary) SetApprovalStatus(val OptString)

SetApprovalStatus sets the value of ApprovalStatus.

func (*JobSummary) SetCode

func (s *JobSummary) SetCode(val OptNilString)

SetCode sets the value of Code.

func (*JobSummary) SetDepartment

func (s *JobSummary) SetDepartment(val []string)

SetDepartment sets the value of Department.

func (*JobSummary) SetID

func (s *JobSummary) SetID(val int)

SetID sets the value of ID.

func (*JobSummary) SetIsInternal

func (s *JobSummary) SetIsInternal(val OptBool)

SetIsInternal sets the value of IsInternal.

func (*JobSummary) SetLanguage

func (s *JobSummary) SetLanguage(val OptString)

SetLanguage sets the value of Language.

func (*JobSummary) SetLocation

func (s *JobSummary) SetLocation(val OptLocation)

SetLocation sets the value of Location.

func (*JobSummary) SetLocations

func (s *JobSummary) SetLocations(val []Location)

SetLocations sets the value of Locations.

func (*JobSummary) SetPublished

func (s *JobSummary) SetPublished(val OptString)

SetPublished sets the value of Published.

func (*JobSummary) SetRemote

func (s *JobSummary) SetRemote(val OptBool)

SetRemote sets the value of Remote.

func (*JobSummary) SetShortcode

func (s *JobSummary) SetShortcode(val string)

SetShortcode sets the value of Shortcode.

func (*JobSummary) SetState

func (s *JobSummary) SetState(val OptString)

SetState sets the value of State.

func (*JobSummary) SetTitle

func (s *JobSummary) SetTitle(val string)

SetTitle sets the value of Title.

func (*JobSummary) SetType

func (s *JobSummary) SetType(val OptString)

SetType sets the value of Type.

func (*JobSummary) SetWorkplace

func (s *JobSummary) SetWorkplace(val OptJobSummaryWorkplace)

SetWorkplace sets the value of Workplace.

func (*JobSummary) UnmarshalJSON

func (s *JobSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*JobSummary) Validate

func (s *JobSummary) Validate() error

type JobSummaryWorkplace

type JobSummaryWorkplace string
const (
	JobSummaryWorkplaceOnSite JobSummaryWorkplace = "on_site"
	JobSummaryWorkplaceHybrid JobSummaryWorkplace = "hybrid"
	JobSummaryWorkplaceRemote JobSummaryWorkplace = "remote"
)

func (JobSummaryWorkplace) AllValues

AllValues returns all JobSummaryWorkplace values.

func (*JobSummaryWorkplace) Decode

func (s *JobSummaryWorkplace) Decode(d *jx.Decoder) error

Decode decodes JobSummaryWorkplace from json.

func (JobSummaryWorkplace) Encode

func (s JobSummaryWorkplace) Encode(e *jx.Encoder)

Encode encodes JobSummaryWorkplace as json.

func (JobSummaryWorkplace) MarshalJSON

func (s JobSummaryWorkplace) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (JobSummaryWorkplace) MarshalText

func (s JobSummaryWorkplace) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*JobSummaryWorkplace) UnmarshalJSON

func (s *JobSummaryWorkplace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*JobSummaryWorkplace) UnmarshalText

func (s *JobSummaryWorkplace) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (JobSummaryWorkplace) Validate

func (s JobSummaryWorkplace) Validate() error

type Labeler

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

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type ListJobFiltersParams

type ListJobFiltersParams struct {
	// The account subdomain — the slug from its careers URL, e.g. "blueground" in
	// apply.workable.com/blueground.
	Account string
}

ListJobFiltersParams is parameters of listJobFilters operation.

type ListJobFiltersRes

type ListJobFiltersRes interface {
	// contains filtered or unexported methods
}

type Location

type Location struct {
	Country     OptNilString `json:"country"`
	CountryCode OptNilString `json:"countryCode"`
	// Null when the posting has no region (observed live on persado and zego; city/country still set).
	Region OptNilString `json:"region"`
	City   OptNilString `json:"city"`
	// Only on the primary `location` object, not `locations[]`.
	Display OptNilString `json:"display"`
	// Only on `locations[]` entries, not `location`.
	Hidden OptBool `json:"hidden"`
}

Ref: #/components/schemas/Location

func (*Location) Decode

func (s *Location) Decode(d *jx.Decoder) error

Decode decodes Location from json.

func (*Location) Encode

func (s *Location) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Location) GetCity

func (s *Location) GetCity() OptNilString

GetCity returns the value of City.

func (*Location) GetCountry

func (s *Location) GetCountry() OptNilString

GetCountry returns the value of Country.

func (*Location) GetCountryCode

func (s *Location) GetCountryCode() OptNilString

GetCountryCode returns the value of CountryCode.

func (*Location) GetDisplay

func (s *Location) GetDisplay() OptNilString

GetDisplay returns the value of Display.

func (*Location) GetHidden

func (s *Location) GetHidden() OptBool

GetHidden returns the value of Hidden.

func (*Location) GetRegion

func (s *Location) GetRegion() OptNilString

GetRegion returns the value of Region.

func (*Location) MarshalJSON

func (s *Location) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Location) SetCity

func (s *Location) SetCity(val OptNilString)

SetCity sets the value of City.

func (*Location) SetCountry

func (s *Location) SetCountry(val OptNilString)

SetCountry sets the value of Country.

func (*Location) SetCountryCode

func (s *Location) SetCountryCode(val OptNilString)

SetCountryCode sets the value of CountryCode.

func (*Location) SetDisplay

func (s *Location) SetDisplay(val OptNilString)

SetDisplay sets the value of Display.

func (*Location) SetHidden

func (s *Location) SetHidden(val OptBool)

SetHidden sets the value of Hidden.

func (*Location) SetRegion

func (s *Location) SetRegion(val OptNilString)

SetRegion sets the value of Region.

func (*Location) UnmarshalJSON

func (s *Location) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type LocationFilter

type LocationFilter struct {
	Country     OptString `json:"country"`
	CountryCode OptString `json:"countryCode"`
	Region      OptString `json:"region"`
	City        OptString `json:"city"`
}

Any subset of fields; values come from the filters endpoint's locations. Multiple entries OR together. Ref: #/components/schemas/LocationFilter

func (*LocationFilter) Decode

func (s *LocationFilter) Decode(d *jx.Decoder) error

Decode decodes LocationFilter from json.

func (*LocationFilter) Encode

func (s *LocationFilter) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LocationFilter) GetCity

func (s *LocationFilter) GetCity() OptString

GetCity returns the value of City.

func (*LocationFilter) GetCountry

func (s *LocationFilter) GetCountry() OptString

GetCountry returns the value of Country.

func (*LocationFilter) GetCountryCode

func (s *LocationFilter) GetCountryCode() OptString

GetCountryCode returns the value of CountryCode.

func (*LocationFilter) GetRegion

func (s *LocationFilter) GetRegion() OptString

GetRegion returns the value of Region.

func (*LocationFilter) MarshalJSON

func (s *LocationFilter) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LocationFilter) SetCity

func (s *LocationFilter) SetCity(val OptString)

SetCity sets the value of City.

func (*LocationFilter) SetCountry

func (s *LocationFilter) SetCountry(val OptString)

SetCountry sets the value of Country.

func (*LocationFilter) SetCountryCode

func (s *LocationFilter) SetCountryCode(val OptString)

SetCountryCode sets the value of CountryCode.

func (*LocationFilter) SetRegion

func (s *LocationFilter) SetRegion(val OptString)

SetRegion sets the value of Region.

func (*LocationFilter) UnmarshalJSON

func (s *LocationFilter) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type NotFound

type NotFound struct {
	Data io.Reader
}

func (NotFound) Read

func (s NotFound) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	GetJobOperation         OperationName = "GetJob"
	ListJobFiltersOperation OperationName = "ListJobFilters"
	SearchJobsOperation     OperationName = "SearchJobs"
)

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (*OptInt) Decode

func (o *OptInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptInt) Encode

func (o OptInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) MarshalJSON

func (s OptInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

func (*OptInt) UnmarshalJSON

func (s *OptInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptJobDetailWorkplace

type OptJobDetailWorkplace struct {
	Value JobDetailWorkplace
	Set   bool
}

OptJobDetailWorkplace is optional JobDetailWorkplace.

func NewOptJobDetailWorkplace

func NewOptJobDetailWorkplace(v JobDetailWorkplace) OptJobDetailWorkplace

NewOptJobDetailWorkplace returns new OptJobDetailWorkplace with value set to v.

func (*OptJobDetailWorkplace) Decode

func (o *OptJobDetailWorkplace) Decode(d *jx.Decoder) error

Decode decodes JobDetailWorkplace from json.

func (OptJobDetailWorkplace) Encode

func (o OptJobDetailWorkplace) Encode(e *jx.Encoder)

Encode encodes JobDetailWorkplace as json.

func (OptJobDetailWorkplace) Get

Get returns value and boolean that denotes whether value was set.

func (OptJobDetailWorkplace) IsSet

func (o OptJobDetailWorkplace) IsSet() bool

IsSet returns true if OptJobDetailWorkplace was set.

func (OptJobDetailWorkplace) MarshalJSON

func (s OptJobDetailWorkplace) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptJobDetailWorkplace) Or

Or returns value if set, or given parameter if does not.

func (*OptJobDetailWorkplace) Reset

func (o *OptJobDetailWorkplace) Reset()

Reset unsets value.

func (*OptJobDetailWorkplace) SetTo

SetTo sets value to v.

func (*OptJobDetailWorkplace) UnmarshalJSON

func (s *OptJobDetailWorkplace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptJobSummaryWorkplace

type OptJobSummaryWorkplace struct {
	Value JobSummaryWorkplace
	Set   bool
}

OptJobSummaryWorkplace is optional JobSummaryWorkplace.

func NewOptJobSummaryWorkplace

func NewOptJobSummaryWorkplace(v JobSummaryWorkplace) OptJobSummaryWorkplace

NewOptJobSummaryWorkplace returns new OptJobSummaryWorkplace with value set to v.

func (*OptJobSummaryWorkplace) Decode

func (o *OptJobSummaryWorkplace) Decode(d *jx.Decoder) error

Decode decodes JobSummaryWorkplace from json.

func (OptJobSummaryWorkplace) Encode

func (o OptJobSummaryWorkplace) Encode(e *jx.Encoder)

Encode encodes JobSummaryWorkplace as json.

func (OptJobSummaryWorkplace) Get

Get returns value and boolean that denotes whether value was set.

func (OptJobSummaryWorkplace) IsSet

func (o OptJobSummaryWorkplace) IsSet() bool

IsSet returns true if OptJobSummaryWorkplace was set.

func (OptJobSummaryWorkplace) MarshalJSON

func (s OptJobSummaryWorkplace) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptJobSummaryWorkplace) Or

Or returns value if set, or given parameter if does not.

func (*OptJobSummaryWorkplace) Reset

func (o *OptJobSummaryWorkplace) Reset()

Reset unsets value.

func (*OptJobSummaryWorkplace) SetTo

SetTo sets value to v.

func (*OptJobSummaryWorkplace) UnmarshalJSON

func (s *OptJobSummaryWorkplace) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptLocation

type OptLocation struct {
	Value Location
	Set   bool
}

OptLocation is optional Location.

func NewOptLocation

func NewOptLocation(v Location) OptLocation

NewOptLocation returns new OptLocation with value set to v.

func (*OptLocation) Decode

func (o *OptLocation) Decode(d *jx.Decoder) error

Decode decodes Location from json.

func (OptLocation) Encode

func (o OptLocation) Encode(e *jx.Encoder)

Encode encodes Location as json.

func (OptLocation) Get

func (o OptLocation) Get() (v Location, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptLocation) IsSet

func (o OptLocation) IsSet() bool

IsSet returns true if OptLocation was set.

func (OptLocation) MarshalJSON

func (s OptLocation) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptLocation) Or

func (o OptLocation) Or(d Location) Location

Or returns value if set, or given parameter if does not.

func (*OptLocation) Reset

func (o *OptLocation) Reset()

Reset unsets value.

func (*OptLocation) SetTo

func (o *OptLocation) SetTo(v Location)

SetTo sets value to v.

func (*OptLocation) UnmarshalJSON

func (s *OptLocation) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilInt

type OptNilInt struct {
	Value int
	Set   bool
	Null  bool
}

OptNilInt is optional nullable int.

func NewOptNilInt

func NewOptNilInt(v int) OptNilInt

NewOptNilInt returns new OptNilInt with value set to v.

func (*OptNilInt) Decode

func (o *OptNilInt) Decode(d *jx.Decoder) error

Decode decodes int from json.

func (OptNilInt) Encode

func (o OptNilInt) Encode(e *jx.Encoder)

Encode encodes int as json.

func (OptNilInt) Get

func (o OptNilInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptNilInt) IsEmpty

func (o OptNilInt) IsEmpty() bool

IsEmpty returns true if the field was omitted from the payload (not Set and not Null).

func (OptNilInt) IsNull

func (o OptNilInt) IsNull() bool

IsNull returns true if value is Null.

func (OptNilInt) IsSet

func (o OptNilInt) IsSet() bool

IsSet returns true if OptNilInt was set.

func (OptNilInt) MarshalJSON

func (s OptNilInt) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptNilInt) Or

func (o OptNilInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptNilInt) Reset

func (o *OptNilInt) Reset()

Reset unsets value.

func (*OptNilInt) SetTo

func (o *OptNilInt) SetTo(v int)

SetTo sets value to v.

func (*OptNilInt) SetToNull

func (o *OptNilInt) SetToNull()

SetToNull sets value to null.

func (*OptNilInt) UnmarshalJSON

func (s *OptNilInt) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptNilString

type OptNilString struct {
	Value string
	Set   bool
	Null  bool
}

OptNilString is optional nullable string.

func NewOptNilString

func NewOptNilString(v string) OptNilString

NewOptNilString returns new OptNilString with value set to v.

func (*OptNilString) Decode

func (o *OptNilString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptNilString) Encode

func (o OptNilString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptNilString) Get

func (o OptNilString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptNilString) IsEmpty

func (o OptNilString) IsEmpty() bool

IsEmpty returns true if the field was omitted from the payload (not Set and not Null).

func (OptNilString) IsNull

func (o OptNilString) IsNull() bool

IsNull returns true if value is Null.

func (OptNilString) IsSet

func (o OptNilString) IsSet() bool

IsSet returns true if OptNilString was set.

func (OptNilString) MarshalJSON

func (s OptNilString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptNilString) Or

func (o OptNilString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptNilString) Reset

func (o *OptNilString) Reset()

Reset unsets value.

func (*OptNilString) SetTo

func (o *OptNilString) SetTo(v string)

SetTo sets value to v.

func (*OptNilString) SetToNull

func (o *OptNilString) SetToNull()

SetToNull sets value to null.

func (*OptNilString) UnmarshalJSON

func (s *OptNilString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithAttributes

func WithAttributes(attributes ...attribute.KeyValue) Option

WithAttributes specifies default otel attributes.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type RosterCompany

type RosterCompany struct {
	Name    string `yaml:"company" json:"company"`
	Account string `yaml:"account" json:"account"`
}

RosterCompany is a confirmed organization hosting a public Workable careers page (internal/provider/workable/companies.yaml). Every entry was verified against the live job board API — HTTP 200 with total > 0 and a display name matching the account metadata endpoint. Account is the subdomain the API takes as its account path parameter, e.g. "blueground" for apply.workable.com/api/v3/accounts/blueground/jobs.

func (RosterCompany) CareersURL

func (c RosterCompany) CareersURL() string

CareersURL returns the company's human-facing careers page, e.g. https://apply.workable.com/blueground/. API calls instead pass Account directly as the account parameter.

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationGroup

func (r Route) OperationGroup() string

OperationGroup returns the x-ogen-operation-group value.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SearchJobsParams

type SearchJobsParams struct {
	// The account subdomain — the slug from its careers URL, e.g. "blueground" in
	// apply.workable.com/blueground.
	Account string
}

SearchJobsParams is parameters of searchJobs operation.

type SearchJobsRes

type SearchJobsRes interface {
	// contains filtered or unexported methods
}

type SearchRequest

type SearchRequest struct {
	// Server-side keyword filter over title and body text.
	Query    OptString        `json:"query"`
	Location []LocationFilter `json:"location"`
	// Numeric department ids from the filters endpoint.
	Department []int `json:"department"`
	// The strings "true" and/or "false", not booleans.
	Remote    []string                     `json:"remote"`
	Workplace []SearchRequestWorkplaceItem `json:"workplace"`
	Worktype  []string                     `json:"worktype"`
	// The previous page's nextPage cursor.
	Token OptString `json:"token"`
}

Ref: #/components/schemas/SearchRequest

func (*SearchRequest) Decode

func (s *SearchRequest) Decode(d *jx.Decoder) error

Decode decodes SearchRequest from json.

func (*SearchRequest) Encode

func (s *SearchRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SearchRequest) GetDepartment

func (s *SearchRequest) GetDepartment() []int

GetDepartment returns the value of Department.

func (*SearchRequest) GetLocation

func (s *SearchRequest) GetLocation() []LocationFilter

GetLocation returns the value of Location.

func (*SearchRequest) GetQuery

func (s *SearchRequest) GetQuery() OptString

GetQuery returns the value of Query.

func (*SearchRequest) GetRemote

func (s *SearchRequest) GetRemote() []string

GetRemote returns the value of Remote.

func (*SearchRequest) GetToken

func (s *SearchRequest) GetToken() OptString

GetToken returns the value of Token.

func (*SearchRequest) GetWorkplace

func (s *SearchRequest) GetWorkplace() []SearchRequestWorkplaceItem

GetWorkplace returns the value of Workplace.

func (*SearchRequest) GetWorktype

func (s *SearchRequest) GetWorktype() []string

GetWorktype returns the value of Worktype.

func (*SearchRequest) MarshalJSON

func (s *SearchRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SearchRequest) SetDepartment

func (s *SearchRequest) SetDepartment(val []int)

SetDepartment sets the value of Department.

func (*SearchRequest) SetLocation

func (s *SearchRequest) SetLocation(val []LocationFilter)

SetLocation sets the value of Location.

func (*SearchRequest) SetQuery

func (s *SearchRequest) SetQuery(val OptString)

SetQuery sets the value of Query.

func (*SearchRequest) SetRemote

func (s *SearchRequest) SetRemote(val []string)

SetRemote sets the value of Remote.

func (*SearchRequest) SetToken

func (s *SearchRequest) SetToken(val OptString)

SetToken sets the value of Token.

func (*SearchRequest) SetWorkplace

func (s *SearchRequest) SetWorkplace(val []SearchRequestWorkplaceItem)

SetWorkplace sets the value of Workplace.

func (*SearchRequest) SetWorktype

func (s *SearchRequest) SetWorktype(val []string)

SetWorktype sets the value of Worktype.

func (*SearchRequest) UnmarshalJSON

func (s *SearchRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchRequest) Validate

func (s *SearchRequest) Validate() error

type SearchRequestWorkplaceItem

type SearchRequestWorkplaceItem string
const (
	SearchRequestWorkplaceItemOnSite SearchRequestWorkplaceItem = "on_site"
	SearchRequestWorkplaceItemHybrid SearchRequestWorkplaceItem = "hybrid"
	SearchRequestWorkplaceItemRemote SearchRequestWorkplaceItem = "remote"
)

func (SearchRequestWorkplaceItem) AllValues

AllValues returns all SearchRequestWorkplaceItem values.

func (*SearchRequestWorkplaceItem) Decode

Decode decodes SearchRequestWorkplaceItem from json.

func (SearchRequestWorkplaceItem) Encode

func (s SearchRequestWorkplaceItem) Encode(e *jx.Encoder)

Encode encodes SearchRequestWorkplaceItem as json.

func (SearchRequestWorkplaceItem) MarshalJSON

func (s SearchRequestWorkplaceItem) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (SearchRequestWorkplaceItem) MarshalText

func (s SearchRequestWorkplaceItem) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*SearchRequestWorkplaceItem) UnmarshalJSON

func (s *SearchRequestWorkplaceItem) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchRequestWorkplaceItem) UnmarshalText

func (s *SearchRequestWorkplaceItem) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (SearchRequestWorkplaceItem) Validate

func (s SearchRequestWorkplaceItem) Validate() error

type SearchResponse

type SearchResponse struct {
	// Matches across all pages, not this page's count.
	Total   int          `json:"total"`
	Results []JobSummary `json:"results"`
	// Cursor for the next page; absent on the last page.
	NextPage OptString `json:"nextPage"`
}

Ref: #/components/schemas/SearchResponse

func (*SearchResponse) Decode

func (s *SearchResponse) Decode(d *jx.Decoder) error

Decode decodes SearchResponse from json.

func (*SearchResponse) Encode

func (s *SearchResponse) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*SearchResponse) GetNextPage

func (s *SearchResponse) GetNextPage() OptString

GetNextPage returns the value of NextPage.

func (*SearchResponse) GetResults

func (s *SearchResponse) GetResults() []JobSummary

GetResults returns the value of Results.

func (*SearchResponse) GetTotal

func (s *SearchResponse) GetTotal() int

GetTotal returns the value of Total.

func (*SearchResponse) MarshalJSON

func (s *SearchResponse) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*SearchResponse) SetNextPage

func (s *SearchResponse) SetNextPage(val OptString)

SetNextPage sets the value of NextPage.

func (*SearchResponse) SetResults

func (s *SearchResponse) SetResults(val []JobSummary)

SetResults sets the value of Results.

func (*SearchResponse) SetTotal

func (s *SearchResponse) SetTotal(val int)

SetTotal sets the value of Total.

func (*SearchResponse) UnmarshalJSON

func (s *SearchResponse) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchResponse) Validate

func (s *SearchResponse) Validate() error

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) GetJob

func (UnimplementedHandler) GetJob(ctx context.Context, params GetJobParams) (r GetJobRes, _ error)

GetJob implements getJob operation.

Get one published job with its full posting body.

GET /api/v2/accounts/{account}/jobs/{shortcode}

func (UnimplementedHandler) ListJobFilters

ListJobFilters implements listJobFilters operation.

The value domains for SearchRequest's filter fields, including the numeric department ids that the `department` filter requires.

GET /api/v3/accounts/{account}/jobs/filters

func (UnimplementedHandler) SearchJobs

SearchJobs implements searchJobs operation.

Search an account's published jobs.

POST /api/v3/accounts/{account}/jobs

Jump to

Keyboard shortcuts

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