handler

package
v0.0.0-...-d63a0bf Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RepoHandler

type RepoHandler struct {
	GithubRepo repository.GithubRepo
}

func (RepoHandler) Bookmark

func (r RepoHandler) Bookmark(c echo.Context) error

Bookmark godoc @Summary add bookmark @Tags repo-service @Accept json @Produce json @Security jwt @Success 200 {object} model.Response @Failure 400 {object} model.Response @Failure 403 {object} model.Response @Failure 500 {object} model.Response @Router /bookmark/add [post]

func (RepoHandler) DelBookmark

func (r RepoHandler) DelBookmark(c echo.Context) error

DelBookmark godoc @Summary delete bookmark @Tags repo-service @Accept json @Produce json @Security jwt @Success 200 {object} model.Response @Failure 400 {object} model.Response @Failure 500 {object} model.Response @Router /bookmark/delete [delete]

func (RepoHandler) RepoTrending

func (r RepoHandler) RepoTrending(c echo.Context) error

GetTrendingRepo godoc @Summary get trending repos @Tags repo-service @Accept json @Produce json @Security jwt @Success 200 {object} model.Response @Router /github/trending [get]

func (RepoHandler) SelectBookmarks

func (r RepoHandler) SelectBookmarks(c echo.Context) error

SelectBookmark godoc @Summary get bookmark list @Tags repo-service @Accept json @Produce json @Security jwt @Success 200 {object} model.Response @Router /bookmark/list [get]

type UserHandler

type UserHandler struct {
	UserRepo repository.UserRepo
}

func (*UserHandler) HandleSignIn

func (u *UserHandler) HandleSignIn(c echo.Context) error

SignIn godoc @Summary Sign in to access your account @Tags user-service @Accept json @Produce json @Param data body req.ReqSignIn true "user" @Success 200 {object} model.Response @Failure 400 {object} model.Response @Failure 500 {object} model.Response @Router /user/sign-in [post]

func (*UserHandler) HandleSignUp

func (u *UserHandler) HandleSignUp(c echo.Context) error

SignUp godoc @Summary Create new account @Tags user-service @Accept json @Produce json @Param data body req.ReqSignUp true "user" @Success 200 {object} model.Response @Failure 400 {object} model.Response @Failure 404 {object} model.Response @Failure 500 {object} model.Response @Router /user/sign-up [post]

func (*UserHandler) Profile

func (u *UserHandler) Profile(c echo.Context) error

Profile godoc @Summary get user profile @Tags user-service @Accept json @Produce json @Security jwt @Success 200 {object} model.Response @Failure 500 {object} model.Response @Router /user/profile [get]

func (UserHandler) UpdateProfile

func (u UserHandler) UpdateProfile(c echo.Context) error

UpdateProfile godoc @Summary get user profile @Tags user-service @Accept json @Produce json @Param data body req.ReqUpdateUser true "user" @Security jwt @Success 200 {object} model.Response @Failure 500 {object} model.Response @Router /user/profile/update [put]

Jump to

Keyboard shortcuts

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