apple

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Overview

Package apple provides a session-aware client for the public Apple Jobs API.

Code generated by ogen, DO NOT EDIT.

Index

Constants

View Source
const (
	MockJobID         = "200624996"
	MockNotFoundJobID = "999999999"
)

Variables

View Source
var ErrJobNotFound = errors.New("apple: job not found")

ErrJobNotFound marks an Apple position ID that has no active public posting.

View Source
var Products = []Product{
	{Code: "IAD", Name: "Apple Ads"},
	{Code: "AIRPD", Name: "AirPods"},
	{Code: "APPAS", Name: "Apple accessories"},
	{Code: "APPAC", Name: "AppleCare"},
	{Code: "APPMU", Name: "Apple Music"},
	{Code: "APPAY", Name: "Apple Pay"},
	{Code: "APRTS", Name: "Apple Retail Store"},
	{Code: "APPTV", Name: "Apple TV"},
	{Code: "AWB", Name: "Apple Online Store"},
	{Code: "AVPRO", Name: "Apple Vision Pro"},
	{Code: "APPWT", Name: "Apple Watch"},
	{Code: "APPST", Name: "App Store"},
	{Code: "BTSAA", Name: "Beats Audio Accessories"},
	{Code: "CONPRO", Name: "Consumer and Pro Apps"},
	{Code: "FM", Name: "Claris"},
	{Code: "HMPD", Name: "HomePod"},
	{Code: "ICLD", Name: "iCloud"},
	{Code: "IOS", Name: "iOS"},
	{Code: "IPAD", Name: "iPad"},
	{Code: "IPHN", Name: "iPhone"},
	{Code: "IPOD", Name: "iPod"},
	{Code: "ITUNS", Name: "iTunes"},
	{Code: "MAC", Name: "Mac"},
	{Code: "MACOS", Name: "macOS"},
	{Code: "MAPS", Name: "Maps"},
	{Code: "NEWS", Name: "News"},
	{Code: "SIRI", Name: "Siri"},
	{Code: "TVOS", Name: "tvOS"},
	{Code: "VISOS", Name: "visionOS"},
	{Code: "WTOS", Name: "watchOS"},
	{Code: "OTH", Name: "Other"},
}

Products is the products-and-services filter taxonomy. Unlike teams it cannot be listed anonymously (the refData products endpoint requires a signed-in user), so this is a snapshot of the list embedded in the server-rendered search page, captured 2026-07-19.

Functions

func JobURL

func JobURL(positionID, titleSlug string) string

JobURL returns the public Apple Jobs page for a search or detail result.

func NewMockServer

func NewMockServer() *httptest.Server

NewMockServer returns an httptest.Server that replays captured Apple Jobs responses, including the CSRF header and session-cookie search contract. 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) GetJobDetail

func (c *Client) GetJobDetail(ctx context.Context, params GetJobDetailParams) (GetJobDetailRes, error)

GetJobDetail invokes getJobDetail operation.

`jobId` may be the numeric `positionId` returned by search. The public page sometimes appends a location identifier, but the stable numeric position ID resolves the complete multi-location record.

GET /api/v1/jobDetails/{jobId}

func (*Client) InitSession

func (c *Client) InitSession(ctx context.Context) (*InitSessionOK, error)

InitSession invokes initSession operation.

Initialize an anonymous Apple Jobs search session.

GET /api/v1/CSRFToken

func (*Client) ListTeams

func (c *Client) ListTeams(ctx context.Context) (*TeamsResponse, error)

ListTeams invokes listTeams operation.

Anonymous reference-data endpoint behind the search page's Teams filter; it needs no search session. Sibling refData endpoints: `postlocation?input=…` and `languagesByInput?input=…` are public typeaheads, while `products` rejects anonymous sessions (the product list is embedded in the server-rendered search page).

GET /api/v1/refData/teamsofinterest

func (*Client) PostSearchJobs

func (c *Client) PostSearchJobs(ctx context.Context, request *SearchJobsRequest, params PostSearchJobsParams) (PostSearchJobsRes, error)

PostSearchJobs invokes postSearchJobs operation.

Search Apple job postings.

POST /api/v1/search

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 DateFormat

type DateFormat struct {
	LongDate   DateFormatLongDate   `json:"longDate"`
	MediumDate DateFormatMediumDate `json:"mediumDate"`
}

Ref: #/components/schemas/DateFormat

func (*DateFormat) Decode

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

Decode decodes DateFormat from json.

func (*DateFormat) Encode

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

Encode implements json.Marshaler.

func (*DateFormat) GetLongDate

func (s *DateFormat) GetLongDate() DateFormatLongDate

GetLongDate returns the value of LongDate.

func (*DateFormat) GetMediumDate

func (s *DateFormat) GetMediumDate() DateFormatMediumDate

GetMediumDate returns the value of MediumDate.

func (*DateFormat) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*DateFormat) SetLongDate

func (s *DateFormat) SetLongDate(val DateFormatLongDate)

SetLongDate sets the value of LongDate.

func (*DateFormat) SetMediumDate

func (s *DateFormat) SetMediumDate(val DateFormatMediumDate)

SetMediumDate sets the value of MediumDate.

func (*DateFormat) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DateFormat) Validate

func (s *DateFormat) Validate() error

type DateFormatLongDate

type DateFormatLongDate string
const (
	DateFormatLongDateMMMMDYYYY DateFormatLongDate = "MMMM D, YYYY"
)

func (DateFormatLongDate) AllValues

func (DateFormatLongDate) AllValues() []DateFormatLongDate

AllValues returns all DateFormatLongDate values.

func (*DateFormatLongDate) Decode

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

Decode decodes DateFormatLongDate from json.

func (DateFormatLongDate) Encode

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

Encode encodes DateFormatLongDate as json.

func (DateFormatLongDate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (DateFormatLongDate) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*DateFormatLongDate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DateFormatLongDate) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (DateFormatLongDate) Validate

func (s DateFormatLongDate) Validate() error

type DateFormatMediumDate

type DateFormatMediumDate string
const (
	DateFormatMediumDateMMMDYYYY DateFormatMediumDate = "MMM D, YYYY"
)

func (DateFormatMediumDate) AllValues

AllValues returns all DateFormatMediumDate values.

func (*DateFormatMediumDate) Decode

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

Decode decodes DateFormatMediumDate from json.

func (DateFormatMediumDate) Encode

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

Encode encodes DateFormatMediumDate as json.

func (DateFormatMediumDate) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (DateFormatMediumDate) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*DateFormatMediumDate) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DateFormatMediumDate) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (DateFormatMediumDate) Validate

func (s DateFormatMediumDate) Validate() error

type DetailLocation

type DetailLocation struct {
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	City          OptString `json:"city"`
	StateProvince OptString `json:"stateProvince"`
	Metro         OptString `json:"metro"`
	CountryName   string    `json:"countryName"`
	ZipCode       OptString `json:"zipCode"`
}

Ref: #/components/schemas/DetailLocation

func (*DetailLocation) Decode

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

Decode decodes DetailLocation from json.

func (*DetailLocation) Encode

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

Encode implements json.Marshaler.

func (*DetailLocation) GetCity

func (s *DetailLocation) GetCity() OptString

GetCity returns the value of City.

func (*DetailLocation) GetCountryName

func (s *DetailLocation) GetCountryName() string

GetCountryName returns the value of CountryName.

func (*DetailLocation) GetID

func (s *DetailLocation) GetID() string

GetID returns the value of ID.

func (*DetailLocation) GetMetro

func (s *DetailLocation) GetMetro() OptString

GetMetro returns the value of Metro.

func (*DetailLocation) GetName

func (s *DetailLocation) GetName() string

GetName returns the value of Name.

func (*DetailLocation) GetStateProvince

func (s *DetailLocation) GetStateProvince() OptString

GetStateProvince returns the value of StateProvince.

func (*DetailLocation) GetZipCode

func (s *DetailLocation) GetZipCode() OptString

GetZipCode returns the value of ZipCode.

func (*DetailLocation) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*DetailLocation) SetCity

func (s *DetailLocation) SetCity(val OptString)

SetCity sets the value of City.

func (*DetailLocation) SetCountryName

func (s *DetailLocation) SetCountryName(val string)

SetCountryName sets the value of CountryName.

func (*DetailLocation) SetID

func (s *DetailLocation) SetID(val string)

SetID sets the value of ID.

func (*DetailLocation) SetMetro

func (s *DetailLocation) SetMetro(val OptString)

SetMetro sets the value of Metro.

func (*DetailLocation) SetName

func (s *DetailLocation) SetName(val string)

SetName sets the value of Name.

func (*DetailLocation) SetStateProvince

func (s *DetailLocation) SetStateProvince(val OptString)

SetStateProvince sets the value of StateProvince.

func (*DetailLocation) SetZipCode

func (s *DetailLocation) SetZipCode(val OptString)

SetZipCode sets the value of ZipCode.

func (*DetailLocation) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

Ref: #/components/schemas/ErrorResponse

func (*ErrorResponse) Decode

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

Decode decodes ErrorResponse from json.

func (*ErrorResponse) Encode

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

Encode implements json.Marshaler.

func (*ErrorResponse) GetError

func (s *ErrorResponse) GetError() string

GetError returns the value of Error.

func (*ErrorResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ErrorResponse) SetError

func (s *ErrorResponse) SetError(val string)

SetError sets the value of Error.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type GetJobDetailLocale

type GetJobDetailLocale string
const (
	GetJobDetailLocaleEnUs GetJobDetailLocale = "en-us"
)

func (GetJobDetailLocale) AllValues

func (GetJobDetailLocale) AllValues() []GetJobDetailLocale

AllValues returns all GetJobDetailLocale values.

func (GetJobDetailLocale) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*GetJobDetailLocale) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (GetJobDetailLocale) Validate

func (s GetJobDetailLocale) Validate() error

type GetJobDetailParams

type GetJobDetailParams struct {
	JobId  string
	Locale GetJobDetailLocale
}

GetJobDetailParams is parameters of getJobDetail operation.

type GetJobDetailRes

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

type Handler

type Handler interface {
	// GetJobDetail implements getJobDetail operation.
	//
	// `jobId` may be the numeric `positionId` returned by search. The public page sometimes appends a
	// location identifier, but the stable numeric position ID resolves the complete multi-location record.
	//
	// GET /api/v1/jobDetails/{jobId}
	GetJobDetail(ctx context.Context, params GetJobDetailParams) (GetJobDetailRes, error)
	// InitSession implements initSession operation.
	//
	// Initialize an anonymous Apple Jobs search session.
	//
	// GET /api/v1/CSRFToken
	InitSession(ctx context.Context) (*InitSessionOK, error)
	// ListTeams implements listTeams operation.
	//
	// Anonymous reference-data endpoint behind the search page's Teams filter; it needs no search session.
	// Sibling refData endpoints: `postlocation?input=…` and `languagesByInput?input=…` are public
	// typeaheads, while `products` rejects anonymous sessions (the product list is embedded in the
	// server-rendered search page).
	//
	// GET /api/v1/refData/teamsofinterest
	ListTeams(ctx context.Context) (*TeamsResponse, error)
	// PostSearchJobs implements postSearchJobs operation.
	//
	// Search Apple job postings.
	//
	// POST /api/v1/search
	PostSearchJobs(ctx context.Context, req *SearchJobsRequest, params PostSearchJobsParams) (PostSearchJobsRes, error)
}

Handler handles operations described by OpenAPI v3 specification.

type InitSessionOK

type InitSessionOK struct {
	XAppleCsrfToken OptString
}

InitSessionOK is response for InitSession operation.

func (*InitSessionOK) GetXAppleCsrfToken

func (s *InitSessionOK) GetXAppleCsrfToken() OptString

GetXAppleCsrfToken returns the value of XAppleCsrfToken.

func (*InitSessionOK) SetXAppleCsrfToken

func (s *InitSessionOK) SetXAppleCsrfToken(val OptString)

SetXAppleCsrfToken sets the value of XAppleCsrfToken.

func (*InitSessionOK) Validate

func (s *InitSessionOK) Validate() error

type Invoker

type Invoker interface {
	// GetJobDetail invokes getJobDetail operation.
	//
	// `jobId` may be the numeric `positionId` returned by search. The public page sometimes appends a
	// location identifier, but the stable numeric position ID resolves the complete multi-location record.
	//
	// GET /api/v1/jobDetails/{jobId}
	GetJobDetail(ctx context.Context, params GetJobDetailParams) (GetJobDetailRes, error)
	// InitSession invokes initSession operation.
	//
	// Initialize an anonymous Apple Jobs search session.
	//
	// GET /api/v1/CSRFToken
	InitSession(ctx context.Context) (*InitSessionOK, error)
	// ListTeams invokes listTeams operation.
	//
	// Anonymous reference-data endpoint behind the search page's Teams filter; it needs no search session.
	// Sibling refData endpoints: `postlocation?input=…` and `languagesByInput?input=…` are public
	// typeaheads, while `products` rejects anonymous sessions (the product list is embedded in the
	// server-rendered search page).
	//
	// GET /api/v1/refData/teamsofinterest
	ListTeams(ctx context.Context) (*TeamsResponse, error)
	// PostSearchJobs invokes postSearchJobs operation.
	//
	// Search Apple job postings.
	//
	// POST /api/v1/search
	PostSearchJobs(ctx context.Context, request *SearchJobsRequest, params PostSearchJobsParams) (PostSearchJobsRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type JobDetail

type JobDetail struct {
	PositionId              string           `json:"positionId"`
	JobNumber               string           `json:"jobNumber"`
	PostingTitle            string           `json:"postingTitle"`
	TransformedPostingTitle string           `json:"transformedPostingTitle"`
	JobSummary              OptNilString     `json:"jobSummary"`
	Description             OptNilString     `json:"description"`
	Responsibilities        OptNilString     `json:"responsibilities"`
	MinimumQualifications   OptNilString     `json:"minimumQualifications"`
	PreferredQualifications OptNilString     `json:"preferredQualifications"`
	TeamNames               []string         `json:"teamNames"`
	Locations               []DetailLocation `json:"locations"`
	EmploymentType          OptNilString     `json:"employmentType"`
	HomeOffice              bool             `json:"homeOffice"`
	PostingDate             string           `json:"postingDate"`
}

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) GetDescription

func (s *JobDetail) GetDescription() OptNilString

GetDescription returns the value of Description.

func (*JobDetail) GetEmploymentType

func (s *JobDetail) GetEmploymentType() OptNilString

GetEmploymentType returns the value of EmploymentType.

func (*JobDetail) GetHomeOffice

func (s *JobDetail) GetHomeOffice() bool

GetHomeOffice returns the value of HomeOffice.

func (*JobDetail) GetJobNumber

func (s *JobDetail) GetJobNumber() string

GetJobNumber returns the value of JobNumber.

func (*JobDetail) GetJobSummary

func (s *JobDetail) GetJobSummary() OptNilString

GetJobSummary returns the value of JobSummary.

func (*JobDetail) GetLocations

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

GetLocations returns the value of Locations.

func (*JobDetail) GetMinimumQualifications

func (s *JobDetail) GetMinimumQualifications() OptNilString

GetMinimumQualifications returns the value of MinimumQualifications.

func (*JobDetail) GetPositionId

func (s *JobDetail) GetPositionId() string

GetPositionId returns the value of PositionId.

func (*JobDetail) GetPostingDate

func (s *JobDetail) GetPostingDate() string

GetPostingDate returns the value of PostingDate.

func (*JobDetail) GetPostingTitle

func (s *JobDetail) GetPostingTitle() string

GetPostingTitle returns the value of PostingTitle.

func (*JobDetail) GetPreferredQualifications

func (s *JobDetail) GetPreferredQualifications() OptNilString

GetPreferredQualifications returns the value of PreferredQualifications.

func (*JobDetail) GetResponsibilities

func (s *JobDetail) GetResponsibilities() OptNilString

GetResponsibilities returns the value of Responsibilities.

func (*JobDetail) GetTeamNames

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

GetTeamNames returns the value of TeamNames.

func (*JobDetail) GetTransformedPostingTitle

func (s *JobDetail) GetTransformedPostingTitle() string

GetTransformedPostingTitle returns the value of TransformedPostingTitle.

func (*JobDetail) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*JobDetail) SetDescription

func (s *JobDetail) SetDescription(val OptNilString)

SetDescription sets the value of Description.

func (*JobDetail) SetEmploymentType

func (s *JobDetail) SetEmploymentType(val OptNilString)

SetEmploymentType sets the value of EmploymentType.

func (*JobDetail) SetHomeOffice

func (s *JobDetail) SetHomeOffice(val bool)

SetHomeOffice sets the value of HomeOffice.

func (*JobDetail) SetJobNumber

func (s *JobDetail) SetJobNumber(val string)

SetJobNumber sets the value of JobNumber.

func (*JobDetail) SetJobSummary

func (s *JobDetail) SetJobSummary(val OptNilString)

SetJobSummary sets the value of JobSummary.

func (*JobDetail) SetLocations

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

SetLocations sets the value of Locations.

func (*JobDetail) SetMinimumQualifications

func (s *JobDetail) SetMinimumQualifications(val OptNilString)

SetMinimumQualifications sets the value of MinimumQualifications.

func (*JobDetail) SetPositionId

func (s *JobDetail) SetPositionId(val string)

SetPositionId sets the value of PositionId.

func (*JobDetail) SetPostingDate

func (s *JobDetail) SetPostingDate(val string)

SetPostingDate sets the value of PostingDate.

func (*JobDetail) SetPostingTitle

func (s *JobDetail) SetPostingTitle(val string)

SetPostingTitle sets the value of PostingTitle.

func (*JobDetail) SetPreferredQualifications

func (s *JobDetail) SetPreferredQualifications(val OptNilString)

SetPreferredQualifications sets the value of PreferredQualifications.

func (*JobDetail) SetResponsibilities

func (s *JobDetail) SetResponsibilities(val OptNilString)

SetResponsibilities sets the value of Responsibilities.

func (*JobDetail) SetTeamNames

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

SetTeamNames sets the value of TeamNames.

func (*JobDetail) SetTransformedPostingTitle

func (s *JobDetail) SetTransformedPostingTitle(val string)

SetTransformedPostingTitle sets the value of TransformedPostingTitle.

func (*JobDetail) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*JobDetail) Validate

func (s *JobDetail) Validate() error

type JobDetailResponse

type JobDetailResponse struct {
	Res JobDetail `json:"res"`
}

Ref: #/components/schemas/JobDetailResponse

func (*JobDetailResponse) Decode

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

Decode decodes JobDetailResponse from json.

func (*JobDetailResponse) Encode

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

Encode implements json.Marshaler.

func (*JobDetailResponse) GetRes

func (s *JobDetailResponse) GetRes() JobDetail

GetRes returns the value of Res.

func (*JobDetailResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*JobDetailResponse) SetRes

func (s *JobDetailResponse) SetRes(val JobDetail)

SetRes sets the value of Res.

func (*JobDetailResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*JobDetailResponse) Validate

func (s *JobDetailResponse) Validate() error

type JobSummary

type JobSummary struct {
	ID                      string           `json:"id"`
	JobSummary              string           `json:"jobSummary"`
	Locations               []SearchLocation `json:"locations"`
	PositionId              string           `json:"positionId"`
	PostingDate             string           `json:"postingDate"`
	PostingTitle            string           `json:"postingTitle"`
	PostDateInGMT           time.Time        `json:"postDateInGMT"`
	TransformedPostingTitle string           `json:"transformedPostingTitle"`
	ReqId                   string           `json:"reqId"`
	StandardWeeklyHours     float64          `json:"standardWeeklyHours"`
	Team                    Team             `json:"team"`
	HomeOffice              bool             `json:"homeOffice"`
}

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) GetHomeOffice

func (s *JobSummary) GetHomeOffice() bool

GetHomeOffice returns the value of HomeOffice.

func (*JobSummary) GetID

func (s *JobSummary) GetID() string

GetID returns the value of ID.

func (*JobSummary) GetJobSummary

func (s *JobSummary) GetJobSummary() string

GetJobSummary returns the value of JobSummary.

func (*JobSummary) GetLocations

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

GetLocations returns the value of Locations.

func (*JobSummary) GetPositionId

func (s *JobSummary) GetPositionId() string

GetPositionId returns the value of PositionId.

func (*JobSummary) GetPostDateInGMT

func (s *JobSummary) GetPostDateInGMT() time.Time

GetPostDateInGMT returns the value of PostDateInGMT.

func (*JobSummary) GetPostingDate

func (s *JobSummary) GetPostingDate() string

GetPostingDate returns the value of PostingDate.

func (*JobSummary) GetPostingTitle

func (s *JobSummary) GetPostingTitle() string

GetPostingTitle returns the value of PostingTitle.

func (*JobSummary) GetReqId

func (s *JobSummary) GetReqId() string

GetReqId returns the value of ReqId.

func (*JobSummary) GetStandardWeeklyHours

func (s *JobSummary) GetStandardWeeklyHours() float64

GetStandardWeeklyHours returns the value of StandardWeeklyHours.

func (*JobSummary) GetTeam

func (s *JobSummary) GetTeam() Team

GetTeam returns the value of Team.

func (*JobSummary) GetTransformedPostingTitle

func (s *JobSummary) GetTransformedPostingTitle() string

GetTransformedPostingTitle returns the value of TransformedPostingTitle.

func (*JobSummary) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*JobSummary) SetHomeOffice

func (s *JobSummary) SetHomeOffice(val bool)

SetHomeOffice sets the value of HomeOffice.

func (*JobSummary) SetID

func (s *JobSummary) SetID(val string)

SetID sets the value of ID.

func (*JobSummary) SetJobSummary

func (s *JobSummary) SetJobSummary(val string)

SetJobSummary sets the value of JobSummary.

func (*JobSummary) SetLocations

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

SetLocations sets the value of Locations.

func (*JobSummary) SetPositionId

func (s *JobSummary) SetPositionId(val string)

SetPositionId sets the value of PositionId.

func (*JobSummary) SetPostDateInGMT

func (s *JobSummary) SetPostDateInGMT(val time.Time)

SetPostDateInGMT sets the value of PostDateInGMT.

func (*JobSummary) SetPostingDate

func (s *JobSummary) SetPostingDate(val string)

SetPostingDate sets the value of PostingDate.

func (*JobSummary) SetPostingTitle

func (s *JobSummary) SetPostingTitle(val string)

SetPostingTitle sets the value of PostingTitle.

func (*JobSummary) SetReqId

func (s *JobSummary) SetReqId(val string)

SetReqId sets the value of ReqId.

func (*JobSummary) SetStandardWeeklyHours

func (s *JobSummary) SetStandardWeeklyHours(val float64)

SetStandardWeeklyHours sets the value of StandardWeeklyHours.

func (*JobSummary) SetTeam

func (s *JobSummary) SetTeam(val Team)

SetTeam sets the value of Team.

func (*JobSummary) SetTransformedPostingTitle

func (s *JobSummary) SetTransformedPostingTitle(val string)

SetTransformedPostingTitle sets the value of TransformedPostingTitle.

func (*JobSummary) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*JobSummary) Validate

func (s *JobSummary) Validate() error

type JobsClient

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

JobsClient composes the generated OAS Client with Apple's anonymous search session protocol. Search calls are serialized because each CSRF token is bound to the session cookie set by the immediately preceding token request.

The wrapper is named JobsClient (not Client) so it can share this package with ogen-generated types, matching peers such as workday.TenantClient.

func NewJobsClient

func NewJobsClient(baseURL string, httpClient *http.Client) (*JobsClient, error)

NewJobsClient creates a session-aware Apple Jobs client. The supplied HTTP client is cloned before a private cookie jar is attached, so other providers can safely share its transport and timeout without sharing Apple session state.

func (*JobsClient) JobDetail

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

JobDetail returns the complete public posting for a numeric Apple position ID returned by SearchJobs.

func (*JobsClient) ListTeams

func (c *JobsClient) ListTeams(ctx context.Context) (*TeamsResponse, error)

ListTeams returns Apple's team and sub-team filter taxonomy. The endpoint is anonymous reference data and needs no search session.

func (*JobsClient) SearchJobs

func (c *JobsClient) SearchJobs(ctx context.Context, request SearchRequest) (*SearchResponse, error)

SearchJobs initializes an anonymous session and returns one 20-item page of Apple job summaries. Zero Page and Sort values default to page 1 and relevance; Keyword and CountryCode are required.

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 Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	GetJobDetailOperation   OperationName = "GetJobDetail"
	InitSessionOperation    OperationName = "InitSession"
	ListTeamsOperation      OperationName = "ListTeams"
	PostSearchJobsOperation OperationName = "PostSearchJobs"
)

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 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 PostSearchJobsParams

type PostSearchJobsParams struct {
	// Token returned by initSession for the retained cookie session.
	XAppleCsrfToken string
}

PostSearchJobsParams is parameters of postSearchJobs operation.

type PostSearchJobsRes

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

type Product

type Product struct {
	Code string `json:"code"`
	Name string `json:"name"`
}

Product is one Apple products-and-services filter option.

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 SearchFilters

type SearchFilters struct {
	Locations  []string           `json:"locations"`
	HomeOffice OptBool            `json:"homeOffice"`
	Keywords   []string           `json:"keywords"`
	Languages  []string           `json:"languages"`
	Products   []string           `json:"products"`
	Teams      []SearchTeamFilter `json:"teams"`
}

Ref: #/components/schemas/SearchFilters

func (*SearchFilters) Decode

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

Decode decodes SearchFilters from json.

func (*SearchFilters) Encode

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

Encode implements json.Marshaler.

func (*SearchFilters) GetHomeOffice

func (s *SearchFilters) GetHomeOffice() OptBool

GetHomeOffice returns the value of HomeOffice.

func (*SearchFilters) GetKeywords

func (s *SearchFilters) GetKeywords() []string

GetKeywords returns the value of Keywords.

func (*SearchFilters) GetLanguages

func (s *SearchFilters) GetLanguages() []string

GetLanguages returns the value of Languages.

func (*SearchFilters) GetLocations

func (s *SearchFilters) GetLocations() []string

GetLocations returns the value of Locations.

func (*SearchFilters) GetProducts

func (s *SearchFilters) GetProducts() []string

GetProducts returns the value of Products.

func (*SearchFilters) GetTeams

func (s *SearchFilters) GetTeams() []SearchTeamFilter

GetTeams returns the value of Teams.

func (*SearchFilters) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SearchFilters) SetHomeOffice

func (s *SearchFilters) SetHomeOffice(val OptBool)

SetHomeOffice sets the value of HomeOffice.

func (*SearchFilters) SetKeywords

func (s *SearchFilters) SetKeywords(val []string)

SetKeywords sets the value of Keywords.

func (*SearchFilters) SetLanguages

func (s *SearchFilters) SetLanguages(val []string)

SetLanguages sets the value of Languages.

func (*SearchFilters) SetLocations

func (s *SearchFilters) SetLocations(val []string)

SetLocations sets the value of Locations.

func (*SearchFilters) SetProducts

func (s *SearchFilters) SetProducts(val []string)

SetProducts sets the value of Products.

func (*SearchFilters) SetTeams

func (s *SearchFilters) SetTeams(val []SearchTeamFilter)

SetTeams sets the value of Teams.

func (*SearchFilters) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchFilters) Validate

func (s *SearchFilters) Validate() error

type SearchJobsRequest

type SearchJobsRequest struct {
	Query   string                  `json:"query"`
	Filters SearchFilters           `json:"filters"`
	Page    int                     `json:"page"`
	Locale  SearchJobsRequestLocale `json:"locale"`
	Sort    SearchJobsRequestSort   `json:"sort"`
	Format  DateFormat              `json:"format"`
}

Ref: #/components/schemas/SearchJobsRequest

func (*SearchJobsRequest) Decode

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

Decode decodes SearchJobsRequest from json.

func (*SearchJobsRequest) Encode

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

Encode implements json.Marshaler.

func (*SearchJobsRequest) GetFilters

func (s *SearchJobsRequest) GetFilters() SearchFilters

GetFilters returns the value of Filters.

func (*SearchJobsRequest) GetFormat

func (s *SearchJobsRequest) GetFormat() DateFormat

GetFormat returns the value of Format.

func (*SearchJobsRequest) GetLocale

GetLocale returns the value of Locale.

func (*SearchJobsRequest) GetPage

func (s *SearchJobsRequest) GetPage() int

GetPage returns the value of Page.

func (*SearchJobsRequest) GetQuery

func (s *SearchJobsRequest) GetQuery() string

GetQuery returns the value of Query.

func (*SearchJobsRequest) GetSort

GetSort returns the value of Sort.

func (*SearchJobsRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SearchJobsRequest) SetFilters

func (s *SearchJobsRequest) SetFilters(val SearchFilters)

SetFilters sets the value of Filters.

func (*SearchJobsRequest) SetFormat

func (s *SearchJobsRequest) SetFormat(val DateFormat)

SetFormat sets the value of Format.

func (*SearchJobsRequest) SetLocale

func (s *SearchJobsRequest) SetLocale(val SearchJobsRequestLocale)

SetLocale sets the value of Locale.

func (*SearchJobsRequest) SetPage

func (s *SearchJobsRequest) SetPage(val int)

SetPage sets the value of Page.

func (*SearchJobsRequest) SetQuery

func (s *SearchJobsRequest) SetQuery(val string)

SetQuery sets the value of Query.

func (*SearchJobsRequest) SetSort

func (s *SearchJobsRequest) SetSort(val SearchJobsRequestSort)

SetSort sets the value of Sort.

func (*SearchJobsRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchJobsRequest) Validate

func (s *SearchJobsRequest) Validate() error

type SearchJobsRequestLocale

type SearchJobsRequestLocale string
const (
	SearchJobsRequestLocaleEnUs SearchJobsRequestLocale = "en-us"
)

func (SearchJobsRequestLocale) AllValues

AllValues returns all SearchJobsRequestLocale values.

func (*SearchJobsRequestLocale) Decode

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

Decode decodes SearchJobsRequestLocale from json.

func (SearchJobsRequestLocale) Encode

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

Encode encodes SearchJobsRequestLocale as json.

func (SearchJobsRequestLocale) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (SearchJobsRequestLocale) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*SearchJobsRequestLocale) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchJobsRequestLocale) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (SearchJobsRequestLocale) Validate

func (s SearchJobsRequestLocale) Validate() error

type SearchJobsRequestSort

type SearchJobsRequestSort string
const (
	SearchJobsRequestSortRelevance    SearchJobsRequestSort = "relevance"
	SearchJobsRequestSortNewest       SearchJobsRequestSort = "newest"
	SearchJobsRequestSortTeamAsc      SearchJobsRequestSort = "teamAsc"
	SearchJobsRequestSortTeamDesc     SearchJobsRequestSort = "teamDesc"
	SearchJobsRequestSortLocationAsc  SearchJobsRequestSort = "locationAsc"
	SearchJobsRequestSortLocationDesc SearchJobsRequestSort = "locationDesc"
)

func (SearchJobsRequestSort) AllValues

AllValues returns all SearchJobsRequestSort values.

func (*SearchJobsRequestSort) Decode

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

Decode decodes SearchJobsRequestSort from json.

func (SearchJobsRequestSort) Encode

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

Encode encodes SearchJobsRequestSort as json.

func (SearchJobsRequestSort) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (SearchJobsRequestSort) MarshalText

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

MarshalText implements encoding.TextMarshaler.

func (*SearchJobsRequestSort) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchJobsRequestSort) UnmarshalText

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

UnmarshalText implements encoding.TextUnmarshaler.

func (SearchJobsRequestSort) Validate

func (s SearchJobsRequestSort) Validate() error

type SearchLocation

type SearchLocation struct {
	Name        string `json:"name"`
	CountryName string `json:"countryName"`
}

Ref: #/components/schemas/SearchLocation

func (*SearchLocation) Decode

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

Decode decodes SearchLocation from json.

func (*SearchLocation) Encode

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

Encode implements json.Marshaler.

func (*SearchLocation) GetCountryName

func (s *SearchLocation) GetCountryName() string

GetCountryName returns the value of CountryName.

func (*SearchLocation) GetName

func (s *SearchLocation) GetName() string

GetName returns the value of Name.

func (*SearchLocation) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SearchLocation) SetCountryName

func (s *SearchLocation) SetCountryName(val string)

SetCountryName sets the value of CountryName.

func (*SearchLocation) SetName

func (s *SearchLocation) SetName(val string)

SetName sets the value of Name.

func (*SearchLocation) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type SearchRequest

type SearchRequest struct {
	Keyword     string
	CountryCode string
	Locations   []string
	Sort        Sort

	// Keywords are extra keyword filter chips, applied separately from the
	// ranked Keyword query.
	Keywords []string
	// Teams selects team and sub-team pairs; results match any listed pair.
	Teams []TeamFilter
	// Products are bare product codes such as IPHN, MAC, or ICLD.
	Products []string
	// Languages are case-sensitive language codes such as en_US or zh_HK,
	// listed by the public /api/v1/refData/languagesByInput endpoint.
	Languages []string

	Page int
	// HomeOffice keeps only remote-eligible postings when true.
	HomeOffice bool
}

SearchRequest contains the stable, caller-facing Apple search parameters. Keyword is required, and at least one of CountryCode or Locations must be set; every other filter narrows the result set. CountryCode is an ISO 3166-1 alpha-3 code such as TWN or USA. Locations are bare, case-sensitive Apple location codes at any granularity (state, metro, or city, such as TPEI or state953), listed by jobs.apple.com's location typeahead; passing the wrong case (e.g. STATE953) resolves to a different, usually empty, filter. CountryCode and Locations combine into one OR'd location filter when both are set.

type SearchResponse

type SearchResponse struct {
	Res SearchResult `json:"res"`
}

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) GetRes

func (s *SearchResponse) GetRes() SearchResult

GetRes returns the value of Res.

func (*SearchResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SearchResponse) SetRes

func (s *SearchResponse) SetRes(val SearchResult)

SetRes sets the value of Res.

func (*SearchResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchResponse) Validate

func (s *SearchResponse) Validate() error

type SearchResult

type SearchResult struct {
	SearchResults []JobSummary `json:"searchResults"`
	TotalRecords  int          `json:"totalRecords"`
}

Ref: #/components/schemas/SearchResult

func (*SearchResult) Decode

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

Decode decodes SearchResult from json.

func (*SearchResult) Encode

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

Encode implements json.Marshaler.

func (*SearchResult) GetSearchResults

func (s *SearchResult) GetSearchResults() []JobSummary

GetSearchResults returns the value of SearchResults.

func (*SearchResult) GetTotalRecords

func (s *SearchResult) GetTotalRecords() int

GetTotalRecords returns the value of TotalRecords.

func (*SearchResult) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SearchResult) SetSearchResults

func (s *SearchResult) SetSearchResults(val []JobSummary)

SetSearchResults sets the value of SearchResults.

func (*SearchResult) SetTotalRecords

func (s *SearchResult) SetTotalRecords(val int)

SetTotalRecords sets the value of TotalRecords.

func (*SearchResult) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchResult) Validate

func (s *SearchResult) Validate() error

type SearchTeamFilter

type SearchTeamFilter struct {
	Team    string `json:"team"`
	SubTeam string `json:"subTeam"`
}

Ref: #/components/schemas/SearchTeamFilter

func (*SearchTeamFilter) Decode

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

Decode decodes SearchTeamFilter from json.

func (*SearchTeamFilter) Encode

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

Encode implements json.Marshaler.

func (*SearchTeamFilter) GetSubTeam

func (s *SearchTeamFilter) GetSubTeam() string

GetSubTeam returns the value of SubTeam.

func (*SearchTeamFilter) GetTeam

func (s *SearchTeamFilter) GetTeam() string

GetTeam returns the value of Team.

func (*SearchTeamFilter) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SearchTeamFilter) SetSubTeam

func (s *SearchTeamFilter) SetSubTeam(val string)

SetSubTeam sets the value of SubTeam.

func (*SearchTeamFilter) SetTeam

func (s *SearchTeamFilter) SetTeam(val string)

SetTeam sets the value of Team.

func (*SearchTeamFilter) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*SearchTeamFilter) Validate

func (s *SearchTeamFilter) 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 Sort

type Sort = SearchJobsRequestSort

Sort is an Apple search-result ordering.

const (
	// SortRelevance ranks results against the keyword query.
	SortRelevance Sort = SearchJobsRequestSortRelevance
	// SortNewest orders results by posting date, newest first.
	SortNewest Sort = SearchJobsRequestSortNewest
	// SortTeamAsc and the orderings below sort by team or location name.
	SortTeamAsc      Sort = SearchJobsRequestSortTeamAsc
	SortTeamDesc     Sort = SearchJobsRequestSortTeamDesc
	SortLocationAsc  Sort = SearchJobsRequestSortLocationAsc
	SortLocationDesc Sort = SearchJobsRequestSortLocationDesc
)

type SubTeam

type SubTeam struct {
	// Bare sub-team code, such as CAM.
	Code string `json:"code"`
	// Bare parent team code, such as HRDWR.
	TeamCode string `json:"teamCode"`
	// Full label, such as "Hardware: Camera Technologies".
	DisplayName string `json:"displayName"`
}

Ref: #/components/schemas/SubTeam

func (*SubTeam) Decode

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

Decode decodes SubTeam from json.

func (*SubTeam) Encode

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

Encode implements json.Marshaler.

func (*SubTeam) GetCode

func (s *SubTeam) GetCode() string

GetCode returns the value of Code.

func (*SubTeam) GetDisplayName

func (s *SubTeam) GetDisplayName() string

GetDisplayName returns the value of DisplayName.

func (*SubTeam) GetTeamCode

func (s *SubTeam) GetTeamCode() string

GetTeamCode returns the value of TeamCode.

func (*SubTeam) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*SubTeam) SetCode

func (s *SubTeam) SetCode(val string)

SetCode sets the value of Code.

func (*SubTeam) SetDisplayName

func (s *SubTeam) SetDisplayName(val string)

SetDisplayName sets the value of DisplayName.

func (*SubTeam) SetTeamCode

func (s *SubTeam) SetTeamCode(val string)

SetTeamCode sets the value of TeamCode.

func (*SubTeam) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type Team

type Team struct {
	TeamName string `json:"teamName"`
}

Ref: #/components/schemas/Team

func (*Team) Decode

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

Decode decodes Team from json.

func (*Team) Encode

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

Encode implements json.Marshaler.

func (*Team) GetTeamName

func (s *Team) GetTeamName() string

GetTeamName returns the value of TeamName.

func (*Team) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Team) SetTeamName

func (s *Team) SetTeamName(val string)

SetTeamName sets the value of TeamName.

func (*Team) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type TeamFilter

type TeamFilter struct {
	TeamCode    string
	SubTeamCode string
}

TeamFilter selects one Apple team and sub-team pair by bare code, such as {SFTWR, AF} for "Software and Services: Apps and Frameworks". Codes are listed by JobsClient.ListTeams.

func ParseTeamFilter

func ParseTeamFilter(value string) (TeamFilter, error)

ParseTeamFilter splits a TEAM/SUBTEAM code pair such as HRDWR/CAM.

type TeamGroup

type TeamGroup struct {
	ID string `json:"id"`
	// Human-readable group name, such as "Hardware".
	Type  string    `json:"type"`
	Teams []SubTeam `json:"teams"`
}

Ref: #/components/schemas/TeamGroup

func (*TeamGroup) Decode

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

Decode decodes TeamGroup from json.

func (*TeamGroup) Encode

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

Encode implements json.Marshaler.

func (*TeamGroup) GetID

func (s *TeamGroup) GetID() string

GetID returns the value of ID.

func (*TeamGroup) GetTeams

func (s *TeamGroup) GetTeams() []SubTeam

GetTeams returns the value of Teams.

func (*TeamGroup) GetType

func (s *TeamGroup) GetType() string

GetType returns the value of Type.

func (*TeamGroup) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*TeamGroup) SetID

func (s *TeamGroup) SetID(val string)

SetID sets the value of ID.

func (*TeamGroup) SetTeams

func (s *TeamGroup) SetTeams(val []SubTeam)

SetTeams sets the value of Teams.

func (*TeamGroup) SetType

func (s *TeamGroup) SetType(val string)

SetType sets the value of Type.

func (*TeamGroup) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TeamGroup) Validate

func (s *TeamGroup) Validate() error

type TeamsResponse

type TeamsResponse struct {
	Res []TeamGroup `json:"res"`
}

Ref: #/components/schemas/TeamsResponse

func (*TeamsResponse) Decode

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

Decode decodes TeamsResponse from json.

func (*TeamsResponse) Encode

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

Encode implements json.Marshaler.

func (*TeamsResponse) GetRes

func (s *TeamsResponse) GetRes() []TeamGroup

GetRes returns the value of Res.

func (*TeamsResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*TeamsResponse) SetRes

func (s *TeamsResponse) SetRes(val []TeamGroup)

SetRes sets the value of Res.

func (*TeamsResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*TeamsResponse) Validate

func (s *TeamsResponse) Validate() error

type UnimplementedHandler

type UnimplementedHandler struct{}

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

func (UnimplementedHandler) GetJobDetail

GetJobDetail implements getJobDetail operation.

`jobId` may be the numeric `positionId` returned by search. The public page sometimes appends a location identifier, but the stable numeric position ID resolves the complete multi-location record.

GET /api/v1/jobDetails/{jobId}

func (UnimplementedHandler) InitSession

func (UnimplementedHandler) InitSession(ctx context.Context) (r *InitSessionOK, _ error)

InitSession implements initSession operation.

Initialize an anonymous Apple Jobs search session.

GET /api/v1/CSRFToken

func (UnimplementedHandler) ListTeams

func (UnimplementedHandler) ListTeams(ctx context.Context) (r *TeamsResponse, _ error)

ListTeams implements listTeams operation.

Anonymous reference-data endpoint behind the search page's Teams filter; it needs no search session. Sibling refData endpoints: `postlocation?input=…` and `languagesByInput?input=…` are public typeaheads, while `products` rejects anonymous sessions (the product list is embedded in the server-rendered search page).

GET /api/v1/refData/teamsofinterest

func (UnimplementedHandler) PostSearchJobs

PostSearchJobs implements postSearchJobs operation.

Search Apple job postings.

POST /api/v1/search

Jump to

Keyboard shortcuts

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