Documentation
¶
Index ¶
- type AuthenticationHandler
- type NotificationHandler
- type ProfileHandler
- func (p *ProfileHandler) AddPreferredWorkingLocation(c *gin.Context)
- func (p *ProfileHandler) AddService(c *gin.Context)
- func (p *ProfileHandler) DeleteService(c *gin.Context)
- func (p *ProfileHandler) GetAllPreferredLocations(c *gin.Context)
- func (p *ProfileHandler) GetDetailsOfProviders(c *gin.Context)
- func (p *ProfileHandler) GetSelectedServices(c *gin.Context)
- func (p *ProfileHandler) RemovePreferredLocation(c *gin.Context)
- type WorkHandler
- func (w *WorkHandler) GetAllLeads(c *gin.Context)
- func (w *WorkHandler) GetAllOnGoingWorks(c *gin.Context)
- func (w *WorkHandler) GetAllOtherBidsOnTheLeads(c *gin.Context)
- func (w *WorkHandler) GetCompletedWorks(c *gin.Context)
- func (w *WorkHandler) GetWorksOfAProvider(c *gin.Context)
- func (w *WorkHandler) PlaceBid(c *gin.Context)
- func (w *WorkHandler) ReplaceBidWithNewBid(c *gin.Context)
- func (w *WorkHandler) ViewLeads(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 Provider Login @Description Login handler for jerseyhub providers @Tags Provider @Accept json @Produce json @Param admin body models.Login true "Login Details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/login [post]
func (*AuthenticationHandler) Register ¶
func (a *AuthenticationHandler) Register(c *gin.Context)
@Summary Register @Description This is the Login handler for providers @Tags Provider @Accept json @Produce json @Param name formData string true "name" @Param email formData string true "email" @Param password formData string true "password" @Param repassword formData string true "repassword" @Param phone formData string true "phone" @Param document formData file true "document" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/register [post]
type NotificationHandler ¶
type NotificationHandler struct {
// contains filtered or unexported fields
}
func NewNotificationHandler ¶
func NewNotificationHandler(use interfaces.NotificationUsecase) *NotificationHandler
func (*NotificationHandler) GetAllNotifications ¶
func (n *NotificationHandler) GetAllNotifications(c *gin.Context)
func (*NotificationHandler) ViewNotification ¶
func (n *NotificationHandler) ViewNotification(c *gin.Context)
type ProfileHandler ¶
type ProfileHandler struct {
// contains filtered or unexported fields
}
func NewProfileHandler ¶
func NewProfileHandler(use interfaces.ProfileUsecase) *ProfileHandler
func (*ProfileHandler) AddPreferredWorkingLocation ¶
func (p *ProfileHandler) AddPreferredWorkingLocation(c *gin.Context)
@Summary Add Preferred Location @Description providers can add a location to their preferred location services @Tags Provider @Accept json @Produce json @Param user_id query string true "user-id" @Param district_id query string true "district-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/profile/location [post]
func (*ProfileHandler) AddService ¶
func (p *ProfileHandler) AddService(c *gin.Context)
@Summary Add Service @Description providers can add a service to their providable services @Tags Provider @Accept json @Produce json @Param user_id query string true "user-id" @Param service_id query string true "service-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/profile/service [post]
func (*ProfileHandler) DeleteService ¶
func (p *ProfileHandler) DeleteService(c *gin.Context)
@Summary Delete Service @Description providers can remove a service from their providable services @Tags Provider @Accept json @Produce json @Param user_id query string true "user-id" @Param service_id query string true "service-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/profile/service [delete]
func (*ProfileHandler) GetAllPreferredLocations ¶
func (p *ProfileHandler) GetAllPreferredLocations(c *gin.Context)
@Summary Get All Preferred Locations @Description providers can list their selected services @Tags Provider @Accept json @Produce json @Param user_id query string true "user-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/profile/service [get]
func (*ProfileHandler) GetDetailsOfProviders ¶
func (p *ProfileHandler) GetDetailsOfProviders(c *gin.Context)
@Summary Get Provider Details For User @Description get details of providers when user clicks on provider profile @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/provider/:pro-id [get]
func (*ProfileHandler) GetSelectedServices ¶
func (p *ProfileHandler) GetSelectedServices(c *gin.Context)
@Summary Get Selected Services @Description providers can list their selected services @Tags Provider @Accept json @Produce json @Param user_id query string true "user-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/profile/service [get]
func (*ProfileHandler) RemovePreferredLocation ¶
func (p *ProfileHandler) RemovePreferredLocation(c *gin.Context)
@Summary Remove Preferred Location @Description providers can remove a location from their preferred location services @Tags Provider @Accept json @Produce json @Param user_id query string true "user-id" @Param district_id query string true "district-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/profile/location [delete]
type WorkHandler ¶
type WorkHandler struct {
// contains filtered or unexported fields
}
func NewWorkHandler ¶
func NewWorkHandler(use interfaces.WorkUseCase) *WorkHandler
func (*WorkHandler) GetAllLeads ¶
func (w *WorkHandler) GetAllLeads(c *gin.Context)
@Summary Get All Leads For The Provider @Description get details of all possible leads that provider can bid on them @Tags Provider @Accept json @Produce json @Param pro-id query string true "pro-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/work/leads [get]
func (*WorkHandler) GetAllOnGoingWorks ¶
func (w *WorkHandler) GetAllOnGoingWorks(c *gin.Context)
@Summary Get All Ongoing Works Of A Provider @Description An endpoint to display all the ongoing works of a provider @Tags Provider @Accept json @Produce json @Param pro_id query string true "pro-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/works/my-works/on-going [get]
func (*WorkHandler) GetAllOtherBidsOnTheLeads ¶
func (w *WorkHandler) GetAllOtherBidsOnTheLeads(c *gin.Context)
@Summary Compare All Other Bids On the Work @Description A provider can list all the bids placed on the work by various providers and then he can adjust his bid accordingly @Tags Provider @Accept json @Produce json @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/work/leads/:id/compare [get]
func (*WorkHandler) GetCompletedWorks ¶
func (w *WorkHandler) GetCompletedWorks(c *gin.Context)
@Summary Get All Completed Works Of A Provider @Description An endpoint to display all the completed works of a provider @Tags Provider @Accept json @Produce json @Param pro_id query string true "pro-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/works/my-works/completed [get]
func (*WorkHandler) GetWorksOfAProvider ¶
func (w *WorkHandler) GetWorksOfAProvider(c *gin.Context)
@Summary Get Works Of A Provider @Description An endpoint to display all the works of a 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/provider/:pro_id/works [get]
func (*WorkHandler) PlaceBid ¶
func (w *WorkHandler) PlaceBid(c *gin.Context)
@Summary Place Bid @Description A provider can place bid on an opening @Tags Provider @Accept json @Produce json @Param pro-id query string true "pro-id" @Param bid body models.PlaceBid true "Bid Details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/work/leads/:id/bid [post]
func (*WorkHandler) ReplaceBidWithNewBid ¶
func (w *WorkHandler) ReplaceBidWithNewBid(c *gin.Context)
@Summary Replace Bid with New Bid @Description A provider can replace an existing bid on an opening @Tags Provider @Accept json @Produce json @Param pro-id query string true "pro-id" @Param bid body models.PlaceBid true "Bid Details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/work/leads/:id/bid [put]
func (*WorkHandler) ViewLeads ¶
func (w *WorkHandler) ViewLeads(c *gin.Context)
@Summary Get Details of A lead of provider @Description a call to this endpoint along with the work_id as parametr will get details of the lead @Tags Provider @Accept json @Produce json @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /provider/work/leads/:id [get]