handler

package
v0.0.0-...-93129a6 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOpeningHandler

func CreateOpeningHandler(context *gin.Context)

CreateOpeningHandler @BasePath /api/v1 @Summary Create a new job opening @Description Create a new job opening with the input payload @Tags openings @Accept json @Produce json @Param request body CreateOpeningRequest true "Request body" @Success 200 {object} CreateOpeningResponse @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /opening [post]

func DeleteOpeningHandler

func DeleteOpeningHandler(context *gin.Context)

DeleteOpeningHandler @BasePath /api/v1 @Summary Delete a job opening @Description Delete the job opening with the id supplied @Tags openings @Accept json @Produce json @Param id query string true "Opening identification" @Success 200 {object} DeleteOpeningResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /opening [delete]

func GetOpeningHandler

func GetOpeningHandler(context *gin.Context)

GetOpeningHandler @BasePath /api/v1 @Summary Get a job opening @Description Get the job opening with the id supplied @Tags openings @Accept json @Produce json @Param id query string true "Opening identification" @Success 200 {object} GetOpeningResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Router /opening [get]

func InitializeHandler

func InitializeHandler()

func ListOpeningsHandler

func ListOpeningsHandler(context *gin.Context)

ListOpeningsHandler @BasePath /api/v1 @Summary List all job openings @Description List all job openings @Tags openings @Accept json @Produce json @Success 200 {object} ListOpeningsResponse @Failure 500 {object} ErrorResponse @Router /openings [get]

func UpdateOpeningHandler

func UpdateOpeningHandler(context *gin.Context)

UpdateOpeningHandler @BasePath /api/v1 @Summary Update a job opening @Description Update a job opening with the input payload and id query parameter @Tags openings @Accept json @Produce json @Param id query string true "Opening identification" @Param request body UpdateOpeningRequest true "Opening data to update" @Success 200 {object} UpdateOpeningResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /opening [put]

Types

type CreateOpeningRequest

type CreateOpeningRequest struct {
	Role     string `json:"role"`
	Company  string `json:"company"`
	Location string `json:"location"`
	Remote   *bool  `json:"remote"`
	Link     string `json:"link"`
	Salary   int64  `json:"salary"`
}

CreateOpening

func (*CreateOpeningRequest) Validate

func (r *CreateOpeningRequest) Validate() error

type CreateOpeningResponse

type CreateOpeningResponse struct {
	Message string                  `json:"message"`
	Data    schemas.OpeningResponse `json:"data"`
}

type DeleteOpeningResponse

type DeleteOpeningResponse struct {
	Message string                  `json:"message"`
	Data    schemas.OpeningResponse `json:"data"`
}

type ErrorResponse

type ErrorResponse struct {
	Message   string `json:"message"`
	ErrorCode int    `json:"errorCode"`
}

type GetOpeningResponse

type GetOpeningResponse struct {
	Message string                  `json:"message"`
	Data    schemas.OpeningResponse `json:"data"`
}

type ListOpeningsResponse

type ListOpeningsResponse struct {
	Message string                    `json:"message"`
	Data    []schemas.OpeningResponse `json:"data"`
}

type UpdateOpeningRequest

type UpdateOpeningRequest struct {
	Role     string `json:"role"`
	Company  string `json:"company"`
	Location string `json:"location"`
	Remote   *bool  `json:"remote"`
	Link     string `json:"link"`
	Salary   int64  `json:"salary"`
}

func (*UpdateOpeningRequest) Validate

func (r *UpdateOpeningRequest) Validate() error

type UpdateOpeningResponse

type UpdateOpeningResponse struct {
	Message string                  `json:"message"`
	Data    schemas.OpeningResponse `json:"data"`
}

Jump to

Keyboard shortcuts

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