Documentation ¶
Index ¶
- func CreateOpeningHandler(context *gin.Context)
- func DeleteOpeningHandler(context *gin.Context)
- func GetOpeningHandler(context *gin.Context)
- func InitializeHandler()
- func ListOpeningsHandler(context *gin.Context)
- func UpdateOpeningHandler(context *gin.Context)
- type CreateOpeningRequest
- type CreateOpeningResponse
- type DeleteOpeningResponse
- type ErrorResponse
- type GetOpeningResponse
- type ListOpeningsResponse
- type UpdateOpeningRequest
- type UpdateOpeningResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOpeningHandler ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 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"` }