Documentation
¶
Index ¶
- type AuthenticationHandler
- type WorkHandler
- func (p *WorkHandler) AssignWorkToProvider(c *gin.Context)
- func (p *WorkHandler) GetAllListedWorks(c *gin.Context)
- func (p *WorkHandler) ListAllCompletedWorks(c *gin.Context)
- func (p *WorkHandler) ListAllOngoingWorks(c *gin.Context)
- func (p *WorkHandler) ListNewOpening(c *gin.Context)
- func (p *WorkHandler) MakeWorkAsCompleted(c *gin.Context)
- func (p *WorkHandler) RateWork(c *gin.Context)
- func (p *WorkHandler) WorkDetails(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthenticationHandler ¶
type AuthenticationHandler struct {
Usecase interfaces.AuthenticationUsecase
}
func NewAuthenticationHandler ¶
func NewAuthenticationHandler(use interfaces.AuthenticationUsecase) *AuthenticationHandler
func (*AuthenticationHandler) Login ¶
func (a *AuthenticationHandler) Login(c *gin.Context)
@Summary User Login @Description A user can Login using this endpoint @Tags User @Accept json @Produce json @Param login body models.Login true "login details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/login [post]
func (*AuthenticationHandler) UserSignup ¶
func (a *AuthenticationHandler) UserSignup(c *gin.Context)
@Summary User SignUP @Description A user can signup using this endpoint @Tags User @Accept json @Produce json @Param signup body models.UserSignup true "signup details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/signup [post]
type WorkHandler ¶
type WorkHandler struct {
// contains filtered or unexported fields
}
func NewWorkHandler ¶
func NewWorkHandler(use interfaces.WorkUsecase) *WorkHandler
func (*WorkHandler) AssignWorkToProvider ¶
func (p *WorkHandler) AssignWorkToProvider(c *gin.Context)
@Summary Assign Work To A Provider @Description An endpoint to assign the work to a particular provider @Tags User @Accept json @Produce json @Param pro_id query string true "pro id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works/:id/assign [put]
func (*WorkHandler) GetAllListedWorks ¶
func (p *WorkHandler) GetAllListedWorks(c *gin.Context)
@Summary Get All Listed Works @Description An endpoint to display all the listed works of a user @Tags User @Accept json @Produce json @Param id query string true "id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works [get]
func (*WorkHandler) ListAllCompletedWorks ¶
func (p *WorkHandler) ListAllCompletedWorks(c *gin.Context)
@Summary Get All Completed Works @Description An endpoint to display all the completed works of a user @Tags User @Accept json @Produce json @Param id query string true "id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works/completed [get]
func (*WorkHandler) ListAllOngoingWorks ¶
func (p *WorkHandler) ListAllOngoingWorks(c *gin.Context)
@Summary Get All Ongoing Works @Description An endpoint to display all the Ongoing works of a user @Tags User @Accept json @Produce json @Param id query string true "id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works/on-going [get]
func (*WorkHandler) ListNewOpening ¶
func (p *WorkHandler) ListNewOpening(c *gin.Context)
@Summary List New Opening @Description A user can list a new opening through this endpoint @Tags User @Accept json @Produce json @Param work body domain.Work true "work details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works [post]
func (*WorkHandler) MakeWorkAsCompleted ¶
func (p *WorkHandler) MakeWorkAsCompleted(c *gin.Context)
@Summary Make Work As Completed @Description An endpoint to make the work status as completed @Tags User @Accept json @Produce json @Param pro_id query string true "pro id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works/:id/complete [put]
func (*WorkHandler) RateWork ¶
func (p *WorkHandler) RateWork(c *gin.Context)
@Summary Rate Work @Description Rate The Work By A Provider @Tags User @Accept json @Produce json @Param rating body models.RatingModel true "Rating " @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works/:id/rate [post]
func (*WorkHandler) WorkDetails ¶
func (p *WorkHandler) WorkDetails(c *gin.Context)
@Summary Work details @Description An endpoint to display deatails of works of a user @Tags User @Accept json @Produce json @Param id query string true "id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /user/works/:id [get]