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
- Variables
- func NewMockServer() *httptest.Server
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- func (c *Client) GetJob(ctx context.Context, params GetJobParams) (GetJobRes, error)
- func (c *Client) ListJobFilters(ctx context.Context, params ListJobFiltersParams) (ListJobFiltersRes, error)
- func (c *Client) SearchJobs(ctx context.Context, request *SearchRequest, params SearchJobsParams) (SearchJobsRes, error)
- type ClientOption
- type ErrorHandler
- type FacetDepartment
- func (s *FacetDepartment) Decode(d *jx.Decoder) error
- func (s *FacetDepartment) Encode(e *jx.Encoder)
- func (s *FacetDepartment) GetCount() OptInt
- func (s *FacetDepartment) GetFilter() []int
- func (s *FacetDepartment) GetID() int
- func (s *FacetDepartment) GetName() string
- func (s *FacetDepartment) GetParentID() OptNilInt
- func (s *FacetDepartment) MarshalJSON() ([]byte, error)
- func (s *FacetDepartment) SetCount(val OptInt)
- func (s *FacetDepartment) SetFilter(val []int)
- func (s *FacetDepartment) SetID(val int)
- func (s *FacetDepartment) SetName(val string)
- func (s *FacetDepartment) SetParentID(val OptNilInt)
- func (s *FacetDepartment) UnmarshalJSON(data []byte) error
- type FacetLocation
- func (s *FacetLocation) Decode(d *jx.Decoder) error
- func (s *FacetLocation) Encode(e *jx.Encoder)
- func (s *FacetLocation) GetCity() OptNilString
- func (s *FacetLocation) GetCountry() OptNilString
- func (s *FacetLocation) GetCountryCode() OptNilString
- func (s *FacetLocation) GetDisplay() OptNilString
- func (s *FacetLocation) GetRegion() OptNilString
- func (s *FacetLocation) MarshalJSON() ([]byte, error)
- func (s *FacetLocation) SetCity(val OptNilString)
- func (s *FacetLocation) SetCountry(val OptNilString)
- func (s *FacetLocation) SetCountryCode(val OptNilString)
- func (s *FacetLocation) SetDisplay(val OptNilString)
- func (s *FacetLocation) SetRegion(val OptNilString)
- func (s *FacetLocation) UnmarshalJSON(data []byte) error
- type FiltersResponse
- func (s *FiltersResponse) Decode(d *jx.Decoder) error
- func (s *FiltersResponse) Encode(e *jx.Encoder)
- func (s *FiltersResponse) GetDepartments() []FacetDepartment
- func (s *FiltersResponse) GetLocations() []FacetLocation
- func (s *FiltersResponse) GetRemotes() []bool
- func (s *FiltersResponse) GetWorkplaces() []string
- func (s *FiltersResponse) GetWorktypes() []string
- func (s *FiltersResponse) MarshalJSON() ([]byte, error)
- func (s *FiltersResponse) SetDepartments(val []FacetDepartment)
- func (s *FiltersResponse) SetLocations(val []FacetLocation)
- func (s *FiltersResponse) SetRemotes(val []bool)
- func (s *FiltersResponse) SetWorkplaces(val []string)
- func (s *FiltersResponse) SetWorktypes(val []string)
- func (s *FiltersResponse) UnmarshalJSON(data []byte) error
- func (s *FiltersResponse) Validate() error
- type GetJobParams
- type GetJobRes
- type Handler
- type Invoker
- type JobDetail
- func (s *JobDetail) Decode(d *jx.Decoder) error
- func (s *JobDetail) Encode(e *jx.Encoder)
- func (s *JobDetail) GetAccountUid() OptString
- func (s *JobDetail) GetApprovalStatus() OptString
- func (s *JobDetail) GetBenefits() OptString
- func (s *JobDetail) GetCode() OptNilString
- func (s *JobDetail) GetDepartment() []string
- func (s *JobDetail) GetDescription() OptString
- func (s *JobDetail) GetID() int
- func (s *JobDetail) GetIsInternal() OptBool
- func (s *JobDetail) GetLanguage() OptString
- func (s *JobDetail) GetLocation() OptLocation
- func (s *JobDetail) GetLocations() []Location
- func (s *JobDetail) GetPublished() OptString
- func (s *JobDetail) GetRemote() OptBool
- func (s *JobDetail) GetRequirements() OptString
- func (s *JobDetail) GetShortcode() string
- func (s *JobDetail) GetState() OptString
- func (s *JobDetail) GetTitle() string
- func (s *JobDetail) GetType() OptString
- func (s *JobDetail) GetWorkplace() OptJobDetailWorkplace
- func (s *JobDetail) MarshalJSON() ([]byte, error)
- func (s *JobDetail) SetAccountUid(val OptString)
- func (s *JobDetail) SetApprovalStatus(val OptString)
- func (s *JobDetail) SetBenefits(val OptString)
- func (s *JobDetail) SetCode(val OptNilString)
- func (s *JobDetail) SetDepartment(val []string)
- func (s *JobDetail) SetDescription(val OptString)
- func (s *JobDetail) SetID(val int)
- func (s *JobDetail) SetIsInternal(val OptBool)
- func (s *JobDetail) SetLanguage(val OptString)
- func (s *JobDetail) SetLocation(val OptLocation)
- func (s *JobDetail) SetLocations(val []Location)
- func (s *JobDetail) SetPublished(val OptString)
- func (s *JobDetail) SetRemote(val OptBool)
- func (s *JobDetail) SetRequirements(val OptString)
- func (s *JobDetail) SetShortcode(val string)
- func (s *JobDetail) SetState(val OptString)
- func (s *JobDetail) SetTitle(val string)
- func (s *JobDetail) SetType(val OptString)
- func (s *JobDetail) SetWorkplace(val OptJobDetailWorkplace)
- func (s *JobDetail) UnmarshalJSON(data []byte) error
- func (s *JobDetail) Validate() error
- type JobDetailWorkplace
- func (JobDetailWorkplace) AllValues() []JobDetailWorkplace
- func (s *JobDetailWorkplace) Decode(d *jx.Decoder) error
- func (s JobDetailWorkplace) Encode(e *jx.Encoder)
- func (s JobDetailWorkplace) MarshalJSON() ([]byte, error)
- func (s JobDetailWorkplace) MarshalText() ([]byte, error)
- func (s *JobDetailWorkplace) UnmarshalJSON(data []byte) error
- func (s *JobDetailWorkplace) UnmarshalText(data []byte) error
- func (s JobDetailWorkplace) Validate() error
- type JobSummary
- func (s *JobSummary) Decode(d *jx.Decoder) error
- func (s *JobSummary) Encode(e *jx.Encoder)
- func (s *JobSummary) GetAccountUid() OptString
- func (s *JobSummary) GetApprovalStatus() OptString
- func (s *JobSummary) GetCode() OptNilString
- func (s *JobSummary) GetDepartment() []string
- func (s *JobSummary) GetID() int
- func (s *JobSummary) GetIsInternal() OptBool
- func (s *JobSummary) GetLanguage() OptString
- func (s *JobSummary) GetLocation() OptLocation
- func (s *JobSummary) GetLocations() []Location
- func (s *JobSummary) GetPublished() OptString
- func (s *JobSummary) GetRemote() OptBool
- func (s *JobSummary) GetShortcode() string
- func (s *JobSummary) GetState() OptString
- func (s *JobSummary) GetTitle() string
- func (s *JobSummary) GetType() OptString
- func (s *JobSummary) GetWorkplace() OptJobSummaryWorkplace
- func (s *JobSummary) MarshalJSON() ([]byte, error)
- func (s *JobSummary) SetAccountUid(val OptString)
- func (s *JobSummary) SetApprovalStatus(val OptString)
- func (s *JobSummary) SetCode(val OptNilString)
- func (s *JobSummary) SetDepartment(val []string)
- func (s *JobSummary) SetID(val int)
- func (s *JobSummary) SetIsInternal(val OptBool)
- func (s *JobSummary) SetLanguage(val OptString)
- func (s *JobSummary) SetLocation(val OptLocation)
- func (s *JobSummary) SetLocations(val []Location)
- func (s *JobSummary) SetPublished(val OptString)
- func (s *JobSummary) SetRemote(val OptBool)
- func (s *JobSummary) SetShortcode(val string)
- func (s *JobSummary) SetState(val OptString)
- func (s *JobSummary) SetTitle(val string)
- func (s *JobSummary) SetType(val OptString)
- func (s *JobSummary) SetWorkplace(val OptJobSummaryWorkplace)
- func (s *JobSummary) UnmarshalJSON(data []byte) error
- func (s *JobSummary) Validate() error
- type JobSummaryWorkplace
- func (JobSummaryWorkplace) AllValues() []JobSummaryWorkplace
- func (s *JobSummaryWorkplace) Decode(d *jx.Decoder) error
- func (s JobSummaryWorkplace) Encode(e *jx.Encoder)
- func (s JobSummaryWorkplace) MarshalJSON() ([]byte, error)
- func (s JobSummaryWorkplace) MarshalText() ([]byte, error)
- func (s *JobSummaryWorkplace) UnmarshalJSON(data []byte) error
- func (s *JobSummaryWorkplace) UnmarshalText(data []byte) error
- func (s JobSummaryWorkplace) Validate() error
- type Labeler
- type ListJobFiltersParams
- type ListJobFiltersRes
- type Location
- func (s *Location) Decode(d *jx.Decoder) error
- func (s *Location) Encode(e *jx.Encoder)
- func (s *Location) GetCity() OptNilString
- func (s *Location) GetCountry() OptNilString
- func (s *Location) GetCountryCode() OptNilString
- func (s *Location) GetDisplay() OptNilString
- func (s *Location) GetHidden() OptBool
- func (s *Location) GetRegion() OptNilString
- func (s *Location) MarshalJSON() ([]byte, error)
- func (s *Location) SetCity(val OptNilString)
- func (s *Location) SetCountry(val OptNilString)
- func (s *Location) SetCountryCode(val OptNilString)
- func (s *Location) SetDisplay(val OptNilString)
- func (s *Location) SetHidden(val OptBool)
- func (s *Location) SetRegion(val OptNilString)
- func (s *Location) UnmarshalJSON(data []byte) error
- type LocationFilter
- func (s *LocationFilter) Decode(d *jx.Decoder) error
- func (s *LocationFilter) Encode(e *jx.Encoder)
- func (s *LocationFilter) GetCity() OptString
- func (s *LocationFilter) GetCountry() OptString
- func (s *LocationFilter) GetCountryCode() OptString
- func (s *LocationFilter) GetRegion() OptString
- func (s *LocationFilter) MarshalJSON() ([]byte, error)
- func (s *LocationFilter) SetCity(val OptString)
- func (s *LocationFilter) SetCountry(val OptString)
- func (s *LocationFilter) SetCountryCode(val OptString)
- func (s *LocationFilter) SetRegion(val OptString)
- func (s *LocationFilter) UnmarshalJSON(data []byte) error
- type Middleware
- type NotFound
- type OperationName
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptJobDetailWorkplace
- func (o *OptJobDetailWorkplace) Decode(d *jx.Decoder) error
- func (o OptJobDetailWorkplace) Encode(e *jx.Encoder)
- func (o OptJobDetailWorkplace) Get() (v JobDetailWorkplace, ok bool)
- func (o OptJobDetailWorkplace) IsSet() bool
- func (s OptJobDetailWorkplace) MarshalJSON() ([]byte, error)
- func (o OptJobDetailWorkplace) Or(d JobDetailWorkplace) JobDetailWorkplace
- func (o *OptJobDetailWorkplace) Reset()
- func (o *OptJobDetailWorkplace) SetTo(v JobDetailWorkplace)
- func (s *OptJobDetailWorkplace) UnmarshalJSON(data []byte) error
- type OptJobSummaryWorkplace
- func (o *OptJobSummaryWorkplace) Decode(d *jx.Decoder) error
- func (o OptJobSummaryWorkplace) Encode(e *jx.Encoder)
- func (o OptJobSummaryWorkplace) Get() (v JobSummaryWorkplace, ok bool)
- func (o OptJobSummaryWorkplace) IsSet() bool
- func (s OptJobSummaryWorkplace) MarshalJSON() ([]byte, error)
- func (o OptJobSummaryWorkplace) Or(d JobSummaryWorkplace) JobSummaryWorkplace
- func (o *OptJobSummaryWorkplace) Reset()
- func (o *OptJobSummaryWorkplace) SetTo(v JobSummaryWorkplace)
- func (s *OptJobSummaryWorkplace) UnmarshalJSON(data []byte) error
- type OptLocation
- func (o *OptLocation) Decode(d *jx.Decoder) error
- func (o OptLocation) Encode(e *jx.Encoder)
- func (o OptLocation) Get() (v Location, ok bool)
- func (o OptLocation) IsSet() bool
- func (s OptLocation) MarshalJSON() ([]byte, error)
- func (o OptLocation) Or(d Location) Location
- func (o *OptLocation) Reset()
- func (o *OptLocation) SetTo(v Location)
- func (s *OptLocation) UnmarshalJSON(data []byte) error
- type OptNilInt
- func (o *OptNilInt) Decode(d *jx.Decoder) error
- func (o OptNilInt) Encode(e *jx.Encoder)
- func (o OptNilInt) Get() (v int, ok bool)
- func (o OptNilInt) IsEmpty() bool
- func (o OptNilInt) IsNull() bool
- func (o OptNilInt) IsSet() bool
- func (s OptNilInt) MarshalJSON() ([]byte, error)
- func (o OptNilInt) Or(d int) int
- func (o *OptNilInt) Reset()
- func (o *OptNilInt) SetTo(v int)
- func (o *OptNilInt) SetToNull()
- func (s *OptNilInt) UnmarshalJSON(data []byte) error
- type OptNilString
- func (o *OptNilString) Decode(d *jx.Decoder) error
- func (o OptNilString) Encode(e *jx.Encoder)
- func (o OptNilString) Get() (v string, ok bool)
- func (o OptNilString) IsEmpty() bool
- func (o OptNilString) IsNull() bool
- func (o OptNilString) IsSet() bool
- func (s OptNilString) MarshalJSON() ([]byte, error)
- func (o OptNilString) Or(d string) string
- func (o *OptNilString) Reset()
- func (o *OptNilString) SetTo(v string)
- func (o *OptNilString) SetToNull()
- func (s *OptNilString) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type RosterCompany
- type Route
- type SearchJobsParams
- type SearchJobsRes
- type SearchRequest
- func (s *SearchRequest) Decode(d *jx.Decoder) error
- func (s *SearchRequest) Encode(e *jx.Encoder)
- func (s *SearchRequest) GetDepartment() []int
- func (s *SearchRequest) GetLocation() []LocationFilter
- func (s *SearchRequest) GetQuery() OptString
- func (s *SearchRequest) GetRemote() []string
- func (s *SearchRequest) GetToken() OptString
- func (s *SearchRequest) GetWorkplace() []SearchRequestWorkplaceItem
- func (s *SearchRequest) GetWorktype() []string
- func (s *SearchRequest) MarshalJSON() ([]byte, error)
- func (s *SearchRequest) SetDepartment(val []int)
- func (s *SearchRequest) SetLocation(val []LocationFilter)
- func (s *SearchRequest) SetQuery(val OptString)
- func (s *SearchRequest) SetRemote(val []string)
- func (s *SearchRequest) SetToken(val OptString)
- func (s *SearchRequest) SetWorkplace(val []SearchRequestWorkplaceItem)
- func (s *SearchRequest) SetWorktype(val []string)
- func (s *SearchRequest) UnmarshalJSON(data []byte) error
- func (s *SearchRequest) Validate() error
- type SearchRequestWorkplaceItem
- func (SearchRequestWorkplaceItem) AllValues() []SearchRequestWorkplaceItem
- func (s *SearchRequestWorkplaceItem) Decode(d *jx.Decoder) error
- func (s SearchRequestWorkplaceItem) Encode(e *jx.Encoder)
- func (s SearchRequestWorkplaceItem) MarshalJSON() ([]byte, error)
- func (s SearchRequestWorkplaceItem) MarshalText() ([]byte, error)
- func (s *SearchRequestWorkplaceItem) UnmarshalJSON(data []byte) error
- func (s *SearchRequestWorkplaceItem) UnmarshalText(data []byte) error
- func (s SearchRequestWorkplaceItem) Validate() error
- type SearchResponse
- func (s *SearchResponse) Decode(d *jx.Decoder) error
- func (s *SearchResponse) Encode(e *jx.Encoder)
- func (s *SearchResponse) GetNextPage() OptString
- func (s *SearchResponse) GetResults() []JobSummary
- func (s *SearchResponse) GetTotal() int
- func (s *SearchResponse) MarshalJSON() ([]byte, error)
- func (s *SearchResponse) SetNextPage(val OptString)
- func (s *SearchResponse) SetResults(val []JobSummary)
- func (s *SearchResponse) SetTotal(val int)
- func (s *SearchResponse) UnmarshalJSON(data []byte) error
- func (s *SearchResponse) Validate() error
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type UnimplementedHandler
- func (UnimplementedHandler) GetJob(ctx context.Context, params GetJobParams) (r GetJobRes, _ error)
- func (UnimplementedHandler) ListJobFilters(ctx context.Context, params ListJobFiltersParams) (r ListJobFiltersRes, _ error)
- func (UnimplementedHandler) SearchJobs(ctx context.Context, req *SearchRequest, params SearchJobsParams) (r SearchJobsRes, _ error)
Constants ¶
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.
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 ¶
var Companies = mustLoadCompanies()
Companies holds every confirmed Workable company, sorted by company name.
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 ¶
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.
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 ¶
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 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 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) GetAccountUid ¶
GetAccountUid returns the value of AccountUid.
func (*JobDetail) GetApprovalStatus ¶
GetApprovalStatus returns the value of ApprovalStatus.
func (*JobDetail) GetBenefits ¶
GetBenefits returns the value of Benefits.
func (*JobDetail) GetCode ¶
func (s *JobDetail) GetCode() OptNilString
GetCode returns the value of Code.
func (*JobDetail) GetDepartment ¶
GetDepartment returns the value of Department.
func (*JobDetail) GetDescription ¶
GetDescription returns the value of Description.
func (*JobDetail) GetIsInternal ¶
GetIsInternal returns the value of IsInternal.
func (*JobDetail) GetLanguage ¶
GetLanguage returns the value of Language.
func (*JobDetail) GetLocation ¶
func (s *JobDetail) GetLocation() OptLocation
GetLocation returns the value of Location.
func (*JobDetail) GetLocations ¶
GetLocations returns the value of Locations.
func (*JobDetail) GetPublished ¶
GetPublished returns the value of Published.
func (*JobDetail) GetRequirements ¶
GetRequirements returns the value of Requirements.
func (*JobDetail) GetShortcode ¶
GetShortcode returns the value of Shortcode.
func (*JobDetail) GetWorkplace ¶
func (s *JobDetail) GetWorkplace() OptJobDetailWorkplace
GetWorkplace returns the value of Workplace.
func (*JobDetail) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*JobDetail) SetAccountUid ¶
SetAccountUid sets the value of AccountUid.
func (*JobDetail) SetApprovalStatus ¶
SetApprovalStatus sets the value of ApprovalStatus.
func (*JobDetail) SetBenefits ¶
SetBenefits sets the value of Benefits.
func (*JobDetail) SetCode ¶
func (s *JobDetail) SetCode(val OptNilString)
SetCode sets the value of Code.
func (*JobDetail) SetDepartment ¶
SetDepartment sets the value of Department.
func (*JobDetail) SetDescription ¶
SetDescription sets the value of Description.
func (*JobDetail) SetIsInternal ¶
SetIsInternal sets the value of IsInternal.
func (*JobDetail) SetLanguage ¶
SetLanguage sets the value of Language.
func (*JobDetail) SetLocation ¶
func (s *JobDetail) SetLocation(val OptLocation)
SetLocation sets the value of Location.
func (*JobDetail) SetLocations ¶
SetLocations sets the value of Locations.
func (*JobDetail) SetPublished ¶
SetPublished sets the value of Published.
func (*JobDetail) SetRequirements ¶
SetRequirements sets the value of Requirements.
func (*JobDetail) SetShortcode ¶
SetShortcode sets the value of Shortcode.
func (*JobDetail) SetWorkplace ¶
func (s *JobDetail) SetWorkplace(val OptJobDetailWorkplace)
SetWorkplace sets the value of Workplace.
func (*JobDetail) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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) 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) 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 ¶
func (JobSummaryWorkplace) AllValues() []JobSummaryWorkplace
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 ¶
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) AttributeSet ¶
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) 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) GetRegion ¶
func (s *Location) GetRegion() OptNilString
GetRegion returns the value of Region.
func (*Location) MarshalJSON ¶
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) SetRegion ¶
func (s *Location) SetRegion(val OptNilString)
SetRegion sets the value of Region.
func (*Location) UnmarshalJSON ¶
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 OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( GetJobOperation OperationName = "GetJob" ListJobFiltersOperation OperationName = "ListJobFilters" SearchJobsOperation OperationName = "SearchJobs" )
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
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 ¶
func (o OptJobDetailWorkplace) Get() (v JobDetailWorkplace, ok bool)
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 ¶
func (o OptJobDetailWorkplace) Or(d JobDetailWorkplace) JobDetailWorkplace
Or returns value if set, or given parameter if does not.
func (*OptJobDetailWorkplace) SetTo ¶
func (o *OptJobDetailWorkplace) SetTo(v JobDetailWorkplace)
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 ¶
func (o OptJobSummaryWorkplace) Get() (v JobSummaryWorkplace, ok bool)
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 ¶
func (o OptJobSummaryWorkplace) Or(d JobSummaryWorkplace) JobSummaryWorkplace
Or returns value if set, or given parameter if does not.
func (*OptJobSummaryWorkplace) SetTo ¶
func (o *OptJobSummaryWorkplace) SetTo(v JobSummaryWorkplace)
SetTo sets value to v.
func (*OptJobSummaryWorkplace) UnmarshalJSON ¶
func (s *OptJobSummaryWorkplace) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptLocation ¶
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) UnmarshalJSON ¶
func (s *OptLocation) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilInt ¶
OptNilInt is optional nullable int.
func NewOptNilInt ¶
NewOptNilInt returns new OptNilInt with value set to v.
func (OptNilInt) IsEmpty ¶
IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
func (OptNilInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptNilInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptNilString ¶
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) UnmarshalJSON ¶
func (s *OptNilString) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
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) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
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 ¶
func (SearchRequestWorkplaceItem) AllValues() []SearchRequestWorkplaceItem
AllValues returns all SearchRequestWorkplaceItem values.
func (*SearchRequestWorkplaceItem) Decode ¶
func (s *SearchRequestWorkplaceItem) Decode(d *jx.Decoder) error
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.
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 ¶
func (UnimplementedHandler) ListJobFilters(ctx context.Context, params ListJobFiltersParams) (r ListJobFiltersRes, _ 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
func (UnimplementedHandler) SearchJobs ¶
func (UnimplementedHandler) SearchJobs(ctx context.Context, req *SearchRequest, params SearchJobsParams) (r SearchJobsRes, _ error)
SearchJobs implements searchJobs operation.
Search an account's published jobs.
POST /api/v3/accounts/{account}/jobs
Source Files
¶
- companies.go
- doc.go
- gen.go
- mocksrv.go
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go