questionController

package
v0.0.0-...-b336cc8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateQuestion

func CreateQuestion(c *gin.Context)

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

func GetQuestion(c *gin.Context)

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

func GetQuestions(c *gin.Context)

Get questions response godoc @Summary questions response @Tags question @Accept json @Produce json @Success 200 {array} questionController.GetQuestionsSwagger @Router /v1/questions [get]

func UpdateAnswer

func UpdateAnswer(c *gin.Context)

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

func UpvoteQuestion(c *gin.Context)

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"`
}

Jump to

Keyboard shortcuts

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