Documentation ¶
Index ¶
- type AnswerHandler
- func (handler *AnswerHandler) AllAnswer(ctx echo.Context) (err error)
- func (c *AnswerHandler) DeleteAnswer(ctx echo.Context) (err error)
- func (c *AnswerHandler) FindAnswerById(ctx echo.Context) (err error)
- func (c *AnswerHandler) InsertAnswer(ctx echo.Context) (err error)
- func (c *AnswerHandler) UpdateAnswer(ctx echo.Context) (err error)
- type AuthHandler
- type QuestionHandler
- func (handler *QuestionHandler) All(ctx echo.Context) (err error)
- func (c *QuestionHandler) Delete(ctx echo.Context) (err error)
- func (c *QuestionHandler) FindAnswer(ctx echo.Context) (err error)
- func (c *QuestionHandler) FindById(ctx echo.Context) (err error)
- func (c *QuestionHandler) Insert(ctx echo.Context) (err error)
- func (c *QuestionHandler) Update(ctx echo.Context) (err error)
- type UserHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnswerHandler ¶
type AnswerHandler struct {
// contains filtered or unexported fields
}
func NewAnswerHandler ¶
func NewAnswerHandler(service service.AnswerService) *AnswerHandler
func (*AnswerHandler) AllAnswer ¶
func (handler *AnswerHandler) AllAnswer(ctx echo.Context) (err error)
Answer godoc @Summary Answer @Description Answer @Tags answer @Accept json @Produce json @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /answer [get]
func (*AnswerHandler) DeleteAnswer ¶
func (c *AnswerHandler) DeleteAnswer(ctx echo.Context) (err error)
Answer godoc @Summary Delete Answer By ID @Description Delete Answer By ID @Tags answer @Accept json @Produce json @Param id path int true "Id Answer" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /answer/{id} [delete]
func (*AnswerHandler) FindAnswerById ¶
func (c *AnswerHandler) FindAnswerById(ctx echo.Context) (err error)
Answer godoc @Summary Answer By ID @Description Answer By ID @Tags answer @Accept json @Produce json @Param id path int true "Id Answer" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /answer/{id} [get]
func (*AnswerHandler) InsertAnswer ¶
func (c *AnswerHandler) InsertAnswer(ctx echo.Context) (err error)
Answer godoc @Summary Answer Insert @Description Answer Insert @Tags answer @Accept json @Produce json @param register body dto.AnswerRequestDTO true "request body insert question" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /answer [post]
func (*AnswerHandler) UpdateAnswer ¶
func (c *AnswerHandler) UpdateAnswer(ctx echo.Context) (err error)
Answwer godoc @Summary Update Answwer By ID @Description Update Answwer By ID @Tags answer @Accept json @Produce json @Param id path int true "Id Answer" @param register body dto.QuestionRequestDTO true "request body insert answer" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /answer/{id} [put]
type AuthHandler ¶
type AuthHandler struct {
// contains filtered or unexported fields
}
func NewAuthHandler ¶
func NewAuthHandler(service service.AuthService, jwtService service.JWTService) *AuthHandler
func (*AuthHandler) Login ¶
func (c *AuthHandler) Login(ctx echo.Context) (err error)
Login godoc @Summary Login user @Description Login user email : admin@gmail.com password : "admin", email : admin2@gmail.com password : "admin" @Tags auth @Accept json @Produce json @param register body dto.LoginDTO true "request body login" @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /login [post]
type QuestionHandler ¶
type QuestionHandler struct {
// contains filtered or unexported fields
}
func NewQuestionHandler ¶
func NewQuestionHandler(service service.QuestionService) *QuestionHandler
func (*QuestionHandler) All ¶
func (handler *QuestionHandler) All(ctx echo.Context) (err error)
Question godoc @Summary Question @Description Question @Tags question @Accept json @Produce json @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /question [get]
func (*QuestionHandler) Delete ¶
func (c *QuestionHandler) Delete(ctx echo.Context) (err error)
Question godoc @Summary Delete Question By ID @Description Delete Question By ID @Tags question @Accept json @Produce json @Param id path int true "Id Question" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /question/{id} [delete]
func (*QuestionHandler) FindAnswer ¶
func (c *QuestionHandler) FindAnswer(ctx echo.Context) (err error)
@Summary Get Answer ID Question @Description Get Answer By ID Question @Tags question @Accept json @Produce json @Param id path int true "Id Question" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /question/answer/{id} [get]
func (*QuestionHandler) FindById ¶
func (c *QuestionHandler) FindById(ctx echo.Context) (err error)
Question godoc @Summary Question By ID @Description Question By ID @Tags question @Accept json @Produce json @Param id path int true "Id Question" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /question/{id} [get]
func (*QuestionHandler) Insert ¶
func (c *QuestionHandler) Insert(ctx echo.Context) (err error)
Question godoc @Summary Question Insert @Description Question Insert @Tags question @Accept json @Produce json @param register body dto.QuestionRequestDTO true "request body insert question" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /question [post]
func (*QuestionHandler) Update ¶
func (c *QuestionHandler) Update(ctx echo.Context) (err error)
Question godoc @Summary Update Question By ID @Description Update Question By ID @Tags question @Accept json @Produce json @Param id path int true "Id Question" @param register body dto.QuestionRequestDTO true "request body insert question" @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /question/{id} [put]
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(service service.UserService) *UserHandler
func (*UserHandler) Profile ¶
func (handler *UserHandler) Profile(ctx echo.Context) (err error)
Profile godoc @Summary Profile user @Description Profile user @Tags accounts @Accept json @Produce json @Security Bearer @Security JWT @Success 200 {object} helper.Response @Failure 400 {object} helper.Response @Failure 401 {object} helper.Response @Failure 500 {object} helper.Response @Router /profile [get]