controller

package
v0.0.0-...-3ddb297 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCtrl

type AuthCtrl struct{}

func (AuthCtrl) Login

func (a AuthCtrl) Login(c *gin.Context)

------------------------------ Login ... @Summary Login by username and password @Description Login by username and password @Produce json @Param loginReq body dto.UserLoginReq true "login request" @Success 200 {object} dto.UserLoginResp @Tags auth @Router /login [POST]

func (AuthCtrl) Logout

func (a AuthCtrl) Logout(c *gin.Context)

------------------------------ Logout ... @Summary Logout by token @Description Logout by token @Param Authorization header string true "jwt" @Success 200 @Tags auth @Router /logout [POST]

type CardCtrl

type CardCtrl struct{}

func (*CardCtrl) CreateNewCard

func (cC *CardCtrl) CreateNewCard(c *gin.Context)

------------------------------ Create new card @Summary Create new card @Description Create new card @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param createReq body dto.CreateNewCardReq true "CreateReq" @Success 200 {object} dto.RespError "Create OK" @Tags card @Router /teams/:teamID/projects/:projectID/cards [POST]

func (*CardCtrl) DeleteCard

func (cC *CardCtrl) DeleteCard(c *gin.Context)

------------------------------ DeleteCardByID @Summary Delete card by ID @Description Delete card by ID @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param deleteReq body dto.DeleteCardReq true "delete request" @Success 200 {object} dto.RespError "delete success" @Tags card @Router /teams/:teamID/projects/:projectID/cards [DELETE]

func (*CardCtrl) GetCardByID

func (cC *CardCtrl) GetCardByID(c *gin.Context)

------------------------------ GetCardByID ... @Summary Get card by ID @Description Get card by ID @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param cardID path int true "cardID" @Success 200 {object} dto.GetCardByIDResp "Get card OK" @Tags card @Router /teams/:teamID/projects/:projectID/cards/:cardID [GET]

func (*CardCtrl) ReorderCard

func (cC *CardCtrl) ReorderCard(c *gin.Context)

------------------------------ ReorderCard @Summary Reorder card @Description Reorder card if in the same column, columnID = 0 @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param reorderReq body dto.ReorderCard trye "ReorderReq" @Success 200 {object} dto.RespError "Reorder success" @Tags card @Router /teams/:teamID/projects/:projectID/cards/reorder [POST]

func (*CardCtrl) UpdateCard

func (cC *CardCtrl) UpdateCard(c *gin.Context)

------------------------------ UpdateCard ... @Summary Update card info @Description Update card info (No column ID) @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param updateReq body dto.UpdateCardInfoReq true "update info" @Success 200 {object} dto.RespError "Update OK" @Tags card @Router /teams/:teamID/projects/:projectID/cards [PATCH]

type ColumnCtrl

type ColumnCtrl struct{}

func (*ColumnCtrl) CreateNewColumn

func (cC *ColumnCtrl) CreateNewColumn(c *gin.Context)

------------------------------ CreateNewColumn ... @Summary Create new column @Description Create new column @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param createReq body dto.CreateNewColumnReq true "CreateReq" @Success 200 {object} dto.RespError "Create success" @Tags column @Router /teams/:teamID/projects/:projectID/columns [POST]

func (*ColumnCtrl) DeleteColumn

func (cC *ColumnCtrl) DeleteColumn(c *gin.Context)

------------------------------ DeleteColumn ... @Summary Delete column by id @Description Delete column by id and all card in column @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param deleteReq body dto.DeleteColumn true "deleteReq" @Success 200 {object} dto.RespError @Tags column @Router /teams/:teamID/projects/:projectID/columns [DELETE]

func (*ColumnCtrl) ReorderColumns

func (cC *ColumnCtrl) ReorderColumns(c *gin.Context)

------------------------------ ReorderColumn ... @Summary Reorder 1 column @Description Reorder 1 column @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param reorderReq body dto.UpdateColumnIndex true "reorderReq" @Success 200 {object} dto.RespError "ReorderOK" @Tags column @Router /teams/:teamID/projects/:projectID/columns/reorder [POST]

func (*ColumnCtrl) UpdateColumn

func (cC *ColumnCtrl) UpdateColumn(c *gin.Context)

------------------------------ UpdateColumn ... @Summary Update column by id @Description Update column by id @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Param updateReq body dto.UpdateColumnReq true "update column info" @Success 200 {object} dto.RespError "Update OK" @Tags column @Router /teams/:teamID/projects/:projectID/columns [PATCH]

type ProjectCtrl

type ProjectCtrl struct{}

func (*ProjectCtrl) CreateNewProject

func (p *ProjectCtrl) CreateNewProject(c *gin.Context)

------------------------------ CreateNewProject ... @Summary Create new project @Description Create new project @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param createReq body dto.CreateProjectReq true "project info" @Success 200 {object} dto.RespError "Create OK" @Tags project @Router /teams/:teamID/projects [POST]

func (*ProjectCtrl) GetAllProjectsFromTeamID

func (p *ProjectCtrl) GetAllProjectsFromTeamID(c *gin.Context)

------------------------------ GetAllProjectsFromTeamID ... @Summary Get all projects @Description Get all projects from teamID @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Success 200 {object} dto.GetAllProjectFromTeamIDResp "projects response" @Tags project @Router /teams/:teamID/projects [GET]

func (*ProjectCtrl) GetProjectDetails

func (p *ProjectCtrl) GetProjectDetails(c *gin.Context)

------------------------------ GetProjectDetails ... @Summary Get project details @Description Get project details by id @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param projectID path int true "projectID" @Success 200 {object} dto.GetProjectDetailsResp "project details" @Tags project @Router /teams/:teamID/projects/:projectID [GET]

func (*ProjectCtrl) GetRecentProject

func (p *ProjectCtrl) GetRecentProject(c *gin.Context)

------------------------------ GetRecentProject @Summary Get recent project @Description Get recent project by recent count @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param recent query int true "recent count" @Success 200 {object} dto.GetRecentCreatedProjectByUserIDResp "Get success" @Tags project @Router /teams/:teamID/projects/recent [GET]

type TeamCtrl

type TeamCtrl struct{}

func (*TeamCtrl) CreateNewTeam

func (t *TeamCtrl) CreateNewTeam(c *gin.Context)

------------------------------ CreateNewTeam ... @Summary Create new team @Description Create new team @Produce json @Param Authorization header string true "jwt" @Param createReq body dto.CreateNewTeamReq true "team info" @Success 200 {object} dto.RespError "Create OK" @Tags team @Router /teams [POST]

func (*TeamCtrl) DeleteTeam

func (t *TeamCtrl) DeleteTeam(c *gin.Context)

------------------------------ DeleteTeam ... @Summary Delete team @Description Delete team @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Success 200 {object} dto.RespError "delete OK" @Tags team @Router /teams/:teamID [DELETE]

func (*TeamCtrl) EditMember

func (t *TeamCtrl) EditMember(c *gin.Context)

------------------------------ Edit member @Summary Edit member @Description Edit member by teamID and userID @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Param editReq body dto.UpdateTeamMemberReq true "Op = add/remove" @Success 200 {object} dto.RespError "edit ok" @Tags team @Router /teams/:teamID [PUT]

func (*TeamCtrl) GetAllTeamByUserID

func (t *TeamCtrl) GetAllTeamByUserID(c *gin.Context)

------------------------------ GetAllTeamByUserID ... @Summary Get all team by userID @Description Get all team by userID @Produce json @Param Authorization header string true "jwt" @Success 200 {object} dto.GetAllTeamByUserIDResp @Tags team @Router /teams [GET]

func (*TeamCtrl) GetTeamByID

func (t *TeamCtrl) GetTeamByID(c *gin.Context)

------------------------------ GetTeamByID ... @Summary Get team by ID @Description Get team by ID @Produce json @Param Authorization header string true "jwt" @Param teamID path int true "teamID" @Success 200 {object} dto.GetTeamByIDResp "team details" @Tags team @Router /teams/:teamID [GET]

type UserCtrl

type UserCtrl struct{}

func (UserCtrl) CreateNewUser

func (u UserCtrl) CreateNewUser(c *gin.Context)

------------------------------ CreateNewUser ... @Summary Create new user @Description Create new user @Produce json @Param createReq body dto.CreateUserReq true "user info" @Success 200 {object} dto.RespError "create OK" @Tags user @Router /user [POST]

func (UserCtrl) GetUserName

func (u UserCtrl) GetUserName(c *gin.Context)

------------------------------ GetUserName @Summary Get user by username pattern @Description Get user by username pattern @Produce json @Param Authorization header string true "jwt" @Param username query string true "username pattern" @Success 200 {object} dto.GetUserNameResp "users info" @Tags user @Router /user [GET]

func (UserCtrl) UpdateUser

func (u UserCtrl) UpdateUser(c *gin.Context)

------------------------------ UpdateUser ... @Summary Update user infomation @Description Update user infomation @Produce json @Param Authorization header string true "jwt" @Param updateReq body dto.UpdateUserReq true "update Req" @Success 200 {object} dto.RespError "Update OK" @Tags user @Router /user [PATCH]

Jump to

Keyboard shortcuts

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