handler

package
v0.0.0-...-4fdbec9 Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOpeningHandler

func CreateOpeningHandler(ctx *gin.Context)

@Summary Create opening @Description Create a new job opening @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(ctx *gin.Context)

@Summary Delete opening @Description Delete a new job opening @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 @Router /opening [delete]

func Init

func Init()

func ListOpeningsHandler

func ListOpeningsHandler(ctx *gin.Context)

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

func ShowOpeningHandler

func ShowOpeningHandler(ctx *gin.Context)

@Summary Show opening @Description Show a job opening @Tags Openings @Accept json @Produce json @Param id query string true "Opening identification" @Success 200 {object} ShowOpeningResponse @Failure 400 {object} ErrorResponse @Failure 404 {object} ErrorResponse @Router /opening [get]

func UpdateOpeningHandler

func UpdateOpeningHandler(ctx *gin.Context)

@Summary Update opening @Description Update a job opening @Tags Openings @Accept json @Produce json @Param id query string true "Opening Identification" @Param opening 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"`
	Level       string `json:"level"`
	Company     string `json:"company"`
	Location    string `json:"location"`
	Remote      *bool  `json:"remote"`
	Link        string `json:"link"`
	Salary      int64  `json:"salary"`
	Title       string `json:"title"`
	Description string `json:"description"`
}

func (*CreateOpeningRequest) Validate

func (request *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 string `json:"errorCode"`
}

type ListOpeningsResponse

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

type ShowOpeningResponse

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

type UpdateOpeningRequest

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

func (*UpdateOpeningRequest) Validate

func (request *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