Documentation
¶
Overview ¶
Package tsmc reads job listings and details from the public TSMC career site.
Index ¶
Constants ¶
const ( ParamLocation = "1277" ParamCategory = "558" ParamJobType = "147" ParamEmploymentType = "542" )
Query parameter field IDs.
const ( LocTaiwan = "13209" LocCanada = "13210" LocChina = "13211" LocGermanyDresden = "2326764" LocGermanyMunich = "4762540" LocJapanYokohama = "13214" LocJapanOsaka = "13215" LocJapanTsukuba = "13216" LocJapanKumamoto = "13217" LocKorea = "13212" LocNetherlands = "13213" LocUSAArizona = "13221" LocUSACalifornia = "13218" LocUSAMassachusetts = "13219" LocUSATexas = "13220" LocUSAWashington = "13222" LocUSAWashingtonDC = "13223" )
Location values for field 1277.
const ( CatRD = "38617" CatSpecialtyTechnology = "38618" CatICDesignTechnology = "38619" CatManufacturing = "38620" CatFacilityAndSafety = "38621" CatProductDevelopment = "38622" CatICPackagingTechnology = "38623" CatTestingDevelopment = "38635" CatQualityAndReliability = "38624" CatIT = "38625" CatInternalAudit = "38626" CatBusinessDevelopment = "38627" CatCustomerService = "38628" CatCorporatePlanning = "38629" CatFinance = "38630" CatHumanResources = "38631" CatLegal = "38632" CatMaterialsManagement = "38633" CatCorporateSustainability = "7898835" CatAdministration = "38634" CatAccessibilityInclusion = "38636" )
Category values for field 558.
const ( JobTypeTechnician = "5710" JobTypeAssociateEngineer = "39075" JobTypeEngineer = "5709" JobTypeManager = "5708" JobTypeOthers = "39076" )
Job type values for field 147.
const ( EmployRegular = "5701" EmployTemporary = "5702" EmployIntern = "13100" EmployApprenticeship = "4348108" )
Employment type values for field 542.
Variables ¶
var CategoryIDs = map[string]string{ "R&D": CatRD, "Specialty Technology": CatSpecialtyTechnology, "IC Design Technology": CatICDesignTechnology, "Manufacturing (fabs)": CatManufacturing, "Facility & Industrial Safety / Environmental Protection": CatFacilityAndSafety, "Product Development": CatProductDevelopment, "R&D Advanced Packaging Technology Development": CatICPackagingTechnology, "Testing Development and Technology": CatTestingDevelopment, "Quality and Reliability": CatQualityAndReliability, "Information Technology": CatIT, "Internal Audit": CatInternalAudit, "Business Development": CatBusinessDevelopment, "Customer Service": CatCustomerService, "Corporate Planning": CatCorporatePlanning, "Finance / Accounting / Risk Management": CatFinance, "Human Resources": CatHumanResources, "Legal": CatLegal, "Materials Management": CatMaterialsManagement, "Corporate Sustainability (ESG)": CatCorporateSustainability, "Administration": CatAdministration, "Accessibility Inclusion": CatAccessibilityInclusion, }
CategoryIDs maps a "Job Category" filter label to its field-558 value.
var EmploymentTypeIDs = map[string]string{ "Regular": EmployRegular, "Temporary": EmployTemporary, "Intern": EmployIntern, "Apprenticeship": EmployApprenticeship, }
EmploymentTypeIDs maps an "Employment Type" filter label to its field-542 value.
var JobTypeIDs = map[string]string{ "Technician": JobTypeTechnician, "Associate Engineer / Admin": JobTypeAssociateEngineer, "Engineer / Admin": JobTypeEngineer, "Manager / Executive": JobTypeManager, "Others": JobTypeOthers, }
JobTypeIDs maps a "Job Type" (job level) filter label to its field-147 value.
var LocationIDs = map[string]string{ "Taiwan": LocTaiwan, "Canada": LocCanada, "China": LocChina, "Germany-Dresden": LocGermanyDresden, "Germany-Munich": LocGermanyMunich, "Japan-Yokohama": LocJapanYokohama, "Japan-Osaka": LocJapanOsaka, "Japan-Tsukuba": LocJapanTsukuba, "Japan-Kumamoto": LocJapanKumamoto, "Korea": LocKorea, "Netherlands": LocNetherlands, "USA-Arizona": LocUSAArizona, "USA-California": LocUSACalifornia, "USA-Massachusetts": LocUSAMassachusetts, "USA-Texas": LocUSATexas, "USA-Washington": LocUSAWashington, "USA-Washington, D.C.": LocUSAWashingtonDC, }
LocationIDs maps a "Location" filter label to its field-1277 value.
Functions ¶
func NewMockServer ¶
NewMockServer returns an httptest.Server that mimics the TSMC careers site with canned fixture responses, so tests never hit the real site. The caller owns the server and must Close it.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
NewClient uses http.DefaultClient when httpClient is nil.
func (*Client) JobDetail ¶
JobDetail expects a Job.ID returned by Client.Jobs.
func (*Client) Jobs ¶
func (c *Client) Jobs(ctx context.Context, p *JobsRequest) (*JobsResponse, error)
Jobs returns summaries whose Job.ID values are accepted by Client.JobDetail.
type JobDetailResponse ¶
type JobsRequest ¶
type JobsRequest struct {
Keyword string
Locations []string
Categories []string
JobTypes []string
EmploymentTypes []string
Page int
PerPage int
}
JobsRequest treats Page as one-based. PerPage values below 1 use the default page size of 10.