Documentation ¶
Index ¶
- func CreateOpeningHandler(ctx *gin.Context)
- func ExcludeOpeningHandler(ctx *gin.Context)
- func InitializeHandler()
- func ListOpeningsHandler(ctx *gin.Context)
- func ShowOpeningHandler(ctx *gin.Context)
- func UpdateOpeningHandler(ctx *gin.Context)
- type CreateOpeningReq
- type CreateOpeningResponse
- type ErrorResponse
- type ListOpeningsResponse
- type ShowOpeningResponse
- type UpdateOpeningReq
- type UpdateOpeningResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOpeningHandler ¶
@BasePath /api/v1 @Description Create a new job opening @Tags Openings @Accept json @Produce json @Param request body CreateOpeningReq true "Request body" @Success 200 {object} CreateOpeningResponse @Failure 400 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /opening [post]
func ExcludeOpeningHandler ¶
@BasePath /api/v1 @Description Delete a job opening @Tags Openings @Accept json @Produce json @Param id path int true "Opening ID" @Success 204 @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /opening/:id [delete]
func InitializeHandler ¶
func InitializeHandler()
func ListOpeningsHandler ¶
@BasePath /api/v1 @Description List all job openings @Tags Openings @Accept json @Produce json @Success 200 {object} ListOpeningsResponse @Failure 500 {object} ErrorResponse @Router /openings [get]
func ShowOpeningHandler ¶
@BasePath /api/v1 @Description Show a job opening @Tags Openings @Accept json @Produce json @Param id path int true "Opening ID" @Success 200 {object} ShowOpeningResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Router /opening/:id [get]
func UpdateOpeningHandler ¶
@BasePath /api/v1 @Description Update a job opening @Tags Openings @Accept json @Produce json @Param id path int true "Opening ID" @Success 200 {object} UpdateOpeningResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Failure 500 {object} ErrorResponse @Router /opening/:id [put]
Types ¶
type CreateOpeningReq ¶
type CreateOpeningReq struct { Role string `json:"role" binding:"required"` Company string `json:"company" binding:"required"` Location string `json:"location" binding:"required"` Remote bool `json:"remote" binding:"required"` Link string `json:"link" binding:"required"` Salary int64 `json:"salary" binding:"required"` }
type CreateOpeningResponse ¶
type CreateOpeningResponse struct { StatusCode int `json:"statusCode"` Data schema.OpeningResponse `json:"data"` }
type ErrorResponse ¶
type ListOpeningsResponse ¶
type ListOpeningsResponse struct { StatusCode int `json:"statusCode"` Data []schema.OpeningResponse `json:"data"` }
type ShowOpeningResponse ¶
type ShowOpeningResponse struct { StatusCode int `json:"statusCode"` Data schema.OpeningResponse `json:"data"` }
type UpdateOpeningReq ¶
type UpdateOpeningReq 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 (*UpdateOpeningReq) IsEmpty ¶
func (r *UpdateOpeningReq) IsEmpty() bool
type UpdateOpeningResponse ¶
type UpdateOpeningResponse struct { StatusCode int `json:"statusCode"` Data schema.OpeningResponse `json:"data"` }