Documentation
¶
Index ¶
- Variables
- func ErrorRes(c *fiber.Ctx, status int, err error) error
- func FiberErrorHandler(c *fiber.Ctx, err error) error
- func InsertData(dbConn db.Connection) fiber.Handler
- func Routes(app *fiber.App, appVersion string, testing bool)
- type CreateOrUpdateOnMatchHookRequestData
- type DataSendToHook
- type ExplainDataSendToHook
- type GetStatusResponse
- type IMap
- type MatchesProcessor
- type PatchScraperUserBody
- type ProcessMatches
- type RouteDeleteMatcherBranchResult
- type RouteDeleteScraperUserBody
- type RouteGetProfilesCountRes
- type RouteScraperScanCVBody
- type RouteScraperScanCVRes
- type SetPublicKeyForScraperUsersBody
- type UpdateProfileReq
Constants ¶
This section is empty.
Variables ¶
var MatchesProcess = &MatchesProcessor{ list: []ProcessMatches{}, c: sync.NewCond(&sync.Mutex{}), started: false, }
MatchesProcess holts the process matches that should be processed in the background
Functions ¶
func FiberErrorHandler ¶
FiberErrorHandler handles errors in fiber In our case that means we change the errors from text to json
func InsertData ¶
func InsertData(dbConn db.Connection) fiber.Handler
InsertData adds the profiles to every route
Types ¶
type CreateOrUpdateOnMatchHookRequestData ¶ added in v1.0.7
type CreateOrUpdateOnMatchHookRequestData struct {
Method *string `json:"method"`
URL *string `json:"url"`
AddHeaders []models.Header `json:"addHeaders"`
}
CreateOrUpdateOnMatchHookRequestData contains the post data for creating and modifiying a OnMatchHook
type DataSendToHook ¶ added in v1.0.6
type DataSendToHook struct {
MatchedProfiles []match.FoundMatch `json:"matchedProfiles"`
CV models.CV `json:"cv"`
KeyID primitive.ObjectID `json:"keyId" description:"The ID of the API key that was used to upload this CV"`
KeyName string `json:"keyName" description:"The Name of the API key that was used to upload this CV"`
IsTest bool `json:"isTest" description:"True if this hook call was manually triggered"`
}
DataSendToHook contains the content for processing a match
type ExplainDataSendToHook ¶ added in v1.0.6
type ExplainDataSendToHook struct {
DataSendToHook DataSendToHook `json:"dataSendToHook"`
}
ExplainDataSendToHook tells what data is send to the hook
type GetStatusResponse ¶
GetStatusResponse contains the response data for the getStatus route
type MatchesProcessor ¶
type MatchesProcessor struct {
// contains filtered or unexported fields
}
MatchesProcessor is a struct that contains a list of matches to be processed in the background
To register a match to be processed call (*MatchesProcessor).AppendMatchesToProcess After calling the above (*MatchesProcessor).processMatches should automatically pick up the match and handle it
func (*MatchesProcessor) AppendMatchesToProcess ¶
func (p *MatchesProcessor) AppendMatchesToProcess(args ProcessMatches)
AppendMatchesToProcess adds a list of matches to be processed by (*MatchesProcessor).processMatches
type PatchScraperUserBody ¶ added in v1.0.17
type PatchScraperUserBody struct {
Username string `json:"username"`
Password string `json:"password"`
}
PatchScraperUserBody is the body of the routePatchScraperUser route
type ProcessMatches ¶
type ProcessMatches struct {
Debug bool
MatchedProfiles []match.FoundMatch
CV models.CV
Logger log.Entry
DBConn db.Connection
KeyID primitive.ObjectID
KeyName string
}
ProcessMatches contains the content for processing a match
func (ProcessMatches) Process ¶
func (args ProcessMatches) Process()
Process processes the matches made to a CV - notify the dashboard /events page about the new match - safe the matches of this reference number for analytics and for detecting duplicates - send emails with the matches or send http requests
type RouteDeleteMatcherBranchResult ¶ added in v1.0.11
type RouteDeleteMatcherBranchResult struct {
UpdatedParents int `json:"updatedParent"`
DeletedBranches int `json:"deletedBranches"`
}
RouteDeleteMatcherBranchResult gives some information about the removal process
type RouteDeleteScraperUserBody ¶ added in v1.0.13
type RouteDeleteScraperUserBody struct {
Username string `json:"username"`
}
RouteDeleteScraperUserBody is the body of the routeDeleteScraperUser
type RouteGetProfilesCountRes ¶
type RouteGetProfilesCountRes struct {
// Total is the total number of profiles
Total uint64 `json:"total"`
// Usable is the number of profiles that can be used for matching
Usable uint64 `json:"usable"`
}
RouteGetProfilesCountRes is the response for routeGetProfilesCount
type RouteScraperScanCVBody ¶
type RouteScraperScanCVBody struct {
CV models.CV `json:"cv"`
Debug bool `json:"debug" jsonSchema:"hidden"`
}
RouteScraperScanCVBody is the request body of the routeScraperScanCV
type RouteScraperScanCVRes ¶
type RouteScraperScanCVRes struct {
Success bool `json:"success"`
HasMatches bool `json:"hasMatches"`
Matches []match.FoundMatch `json:"matches" jsonSchema:"hidden" description:"Only contains matches if the debug property is set to true"`
}
RouteScraperScanCVRes contains the response data of routeScraperScanCV
type SetPublicKeyForScraperUsersBody ¶ added in v1.0.17
type SetPublicKeyForScraperUsersBody struct {
PublicKey string `json:"publicKey"`
}
SetPublicKeyForScraperUsersBody is the request body for routeSetPublicKeyForScraperUsers
type UpdateProfileReq ¶
type UpdateProfileReq struct {
Name *string `json:"name"`
Active *bool `json:"active"`
AllowedScrapers []string `` /* 183-byte string literal not displayed */
MustDesiredProfession *bool `json:"mustDesiredProfession"`
DesiredProfessions []models.ProfileProfession `json:"desiredProfessions"`
YearsSinceWork *int `json:"yearsSinceWork"`
MustExpProfession *bool `json:"mustExpProfession"`
ProfessionExperienced []models.ProfileProfession `json:"professionExperienced"`
MustDriversLicense *bool `json:"mustDriversLicense"`
DriversLicenses []models.ProfileDriversLicense `json:"driversLicenses"`
MustEducationFinished *bool `json:"mustEducationFinished"`
MustEducation *bool `json:"mustEducation"`
YearsSinceEducation *int `json:"yearsSinceEducation"`
Educations []models.ProfileEducation `json:"educations"`
Zipcodes []models.ProfileDutchZipcode `json:"zipCodes"`
Lables map[string]any `` /* 152-byte string literal not displayed */
OnMatch *models.ProfileOnMatch `json:"onMatch"`
}
UpdateProfileReq are all the fields that can be updated in a profile All the top level fields are optional and if null should not be updated