handlers

package
v0.0.0-...-dfe07c5 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ValidTransitions = map[string][]string{
	"Applied":      {"Interviewing", "Rejected"},
	"Interviewing": {"Offered", "Rejected"},
	"Offered":      {"Hired", "Rejected"},
	"Hired":        {},
	"Rejected":     {},
}

Functions

func CanTransition

func CanTransition(currentState, newState string) bool

func CreateCandidate

func CreateCandidate(w http.ResponseWriter, r *http.Request)

CreateCandidate handles POST /candidates

func CreateVacancy

func CreateVacancy(w http.ResponseWriter, r *http.Request)

CreateVacancy handles POST /vacancies

func DeleteCandidate

func DeleteCandidate(w http.ResponseWriter, r *http.Request)

DeleteCandidate handles DELETE /candidates/{id}

func DeleteVacancy

func DeleteVacancy(w http.ResponseWriter, r *http.Request)

DeleteVacancy handles DELETE /vacancies/{id}

func EditCandidateForm

func EditCandidateForm(w http.ResponseWriter, r *http.Request)

EditCandidateForm handles GET /candidates/{id}/edit

func EditVacancyForm

func EditVacancyForm(w http.ResponseWriter, r *http.Request)

EditVacancyForm handles GET /vacancies/{id}/edit

func LandingPage

func LandingPage(w http.ResponseWriter, r *http.Request)

LandingPage handles GET /

func ListCandidates

func ListCandidates(w http.ResponseWriter, r *http.Request)

ListCandidates handles GET /candidates

func ListVacancies

func ListVacancies(w http.ResponseWriter, r *http.Request)

ListVacancies handles GET /vacancies

func NewCandidateForm

func NewCandidateForm(w http.ResponseWriter, r *http.Request)

NewCandidateForm handles GET /candidates/new

func NewVacancyForm

func NewVacancyForm(w http.ResponseWriter, r *http.Request)

NewVacancyForm handles GET /vacancies/new

func StatisticsHandler

func StatisticsHandler(w http.ResponseWriter, r *http.Request)

StatisticsHandler handles GET /statistics

func UpdateCandidate

func UpdateCandidate(w http.ResponseWriter, r *http.Request)

UpdateCandidate handles PUT /candidates/{id}

func UpdateVacancy

func UpdateVacancy(w http.ResponseWriter, r *http.Request)

UpdateVacancy handles PUT /vacancies/{id}

Types

type StatisticsData

type StatisticsData struct {
	TotalVacancies    int
	TotalCandidates   int
	FilledVacancies   int
	PendingCandidates int
}

StatisticsData holds the data for the Statistics page

Jump to

Keyboard shortcuts

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