Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateQuestion ¶
Create question godoc @Summary Create question @Tags question @Accept json @Produce json @Param QuestionValidator body model.QuestionValidator true "QuestionValidator" @Success 200 @Router /v1/questions [post]
func GetQuestion ¶
Get question detail response godoc @Summary question response @Tags question @Accept json @Produce json @Param questionID path int true "id" @Success 200 {object} questionController.GetQuestionSwagger @Router /v1/questions/id/{questionID} [get]
func GetQuestions ¶
Get questions response godoc @Summary questions response @Tags question @Accept json @Produce json @Success 200 {array} questionController.GetQuestionsSwagger @Router /v1/questions [get]
func UpdateAnswer ¶
Update answer godoc @Summary Update answer @Tags question @Accept json @Produce json @Param AnswerValidator body model.AnswerValidator true "AnswerValidator" @Success 200 @Router /v1/questions [put]
func UpvoteQuestion ¶
Update question godoc @Summary Update question @Tags question @Accept json @Produce json @Param QuestionUpvoteValidator body model.QuestionUpvoteValidator true "QuestionUpvoteValidator" @Success 200 @Router /v1/questions/upvote [put]
Types ¶
type GetQuestionSwagger ¶
type GetQuestionSwagger struct { model.ServiceResponse Data model.Question `json:"data"` }
type GetQuestionsSwagger ¶
type GetQuestionsSwagger struct { model.ServiceResponse Data []model.Question `json:"data"` }