adminhandler

package
v0.0.0-...-6720ee0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: Unlicense Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminHandler

type AdminHandler struct {
	// contains filtered or unexported fields
}

func NewAdminHandler

func NewAdminHandler(usecase interfaces.AdminUsecase) *AdminHandler

func (*AdminHandler) AdminLogin

func (ad *AdminHandler) AdminLogin(c *gin.Context)

@Summary Admin Login @Description This is the Login handler for procast admins @Tags Admin @Accept json @Produce json @Param admin body models.AdminLogin true "Admin login details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/login [post]

func (*AdminHandler) CreateNewAdmin

func (ad *AdminHandler) CreateNewAdmin(c *gin.Context)

@Summary Create New Admin @Description Using this end point the super admin can create new admins @Tags Admin @Accept json @Produce json @Param admin body domain.Admin true "Admin Details" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/panel [post]

func (*AdminHandler) DeleteAdmin

func (ad *AdminHandler) DeleteAdmin(c *gin.Context)

@Summary Delete Admin @Description using this handler super admins can delete other admins @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "admin-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/panel [delete]

type CategoryHandler

type CategoryHandler struct {
	// contains filtered or unexported fields
}

func NewCategoryHandler

func NewCategoryHandler(use interfaces.CategoryUsecase) *CategoryHandler

func (*CategoryHandler) CreateCategory

func (ad *CategoryHandler) CreateCategory(c *gin.Context)

@Summary Create Category @Description This handler creates a new category of works and severals services will be there under each categories @Tags Admin @Accept json @Produce json @Param admin body models.CreateCategory true "Create Category" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/category [post]

func (*CategoryHandler) DeleteCategory

func (ad *CategoryHandler) DeleteCategory(c *gin.Context)

@Summary Delete Category @Description A call to this path along with the category id as parameter will result in the deletion of that category @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "category-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/category [delete]

func (*CategoryHandler) ListCategories

func (ad *CategoryHandler) ListCategories(c *gin.Context)

@Summary List Categories @Description A call to this path will list all the catrgories that has been already added by admins before @Tags Admin @Accept json @Produce json @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/category [get]

func (*CategoryHandler) ReActivateCategory

func (ad *CategoryHandler) ReActivateCategory(c *gin.Context)

@Summary Reactivate Category @Description A call to this path along with the category id as parameter will result in the re activation of that category @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "category-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/category [patch]

type RegionHandler

type RegionHandler struct {
	// contains filtered or unexported fields
}

func NewRegionHandler

func NewRegionHandler(use interfaces.RegionUsecase) *RegionHandler

func (*RegionHandler) AddNewDistrict

func (r *RegionHandler) AddNewDistrict(c *gin.Context)

@Summary Add New District @Description Districts are the smallest unit in which procast works,This handler creates a new district under a state which is already exists @Tags Admin @Accept json @Produce json @Param admin body models.AddNewDistrict true "Add District" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/district [post]

func (*RegionHandler) AddNewState

func (r *RegionHandler) AddNewState(c *gin.Context)

@Summary Add New State @Description This handler creates a new state which means that the company is now expanded its size to a new state @Tags Admin @Accept json @Produce json @Param admin body models.AddNewState true "Create state" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/state [post]

func (*RegionHandler) DeleteDistrictFromState

func (r *RegionHandler) DeleteDistrictFromState(c *gin.Context)

@Summary Delete district @Description A call to this path along with the district id as parameter will result in the deletion of that district @Tags Admin @Accept json @Produce json @Security Bearer @Param district_id query string true "district-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/district [delete]

func (*RegionHandler) DeleteState

func (r *RegionHandler) DeleteState(c *gin.Context)

@Summary Delete State @Description A call to this path along with the district id as parameter will result in the deletion of that state @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "state-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/state [delete]

func (*RegionHandler) GetDistrictsFromState

func (r *RegionHandler) GetDistrictsFromState(c *gin.Context)

@Summary Get Districts @Description A call to this path along with the state id as parameter will result in the listing of all active districts under that state @Tags Admin @Accept json @Produce json @Security Bearer @Param state_id query string true "state-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/district [get]

func (*RegionHandler) GetStates

func (r *RegionHandler) GetStates(c *gin.Context)

@Summary List States @Description A call to this path will list all the states that has been already added by admins before or in other words this handler will displays the span of the company in states @Tags Admin @Accept json @Produce json @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/state [get]

func (*RegionHandler) ReActivateDistrict

func (r *RegionHandler) ReActivateDistrict(c *gin.Context)

@Summary Reactivate district @Description A call to this path along with the district id as parameter will result in the re activation of that district @Tags Admin @Accept json @Produce json @Security Bearer @Param district_id query string true "district-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/district [patch]

func (*RegionHandler) ReActivateState

func (r *RegionHandler) ReActivateState(c *gin.Context)

@Summary Reactivate State @Description A call to this path along with the distroct id as parameter will result in the re activation of that state @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "state-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/region/state [patch]

type ServiceHandler

type ServiceHandler struct {
	// contains filtered or unexported fields
}

func NewServiceHandler

func NewServiceHandler(use interfaces.ServiceUsecase) *ServiceHandler

func (*ServiceHandler) AddServicesToACategory

func (s *ServiceHandler) AddServicesToACategory(c *gin.Context)

@Summary Add New Service @Description This handler will create a new service under an existing category @Tags Admin @Accept json @Produce json @Param admin body models.AddServicesToACategory true "Add service" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/services [post]

func (*ServiceHandler) DeleteService

func (s *ServiceHandler) DeleteService(c *gin.Context)

@Summary Delete Services @Description A call to this path along with the service id as parameter will result in the deletion of that service @Tags Admin @Accept json @Produce json @Security Bearer @Param service_id query string true "service-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/services [delete]

func (*ServiceHandler) GetServicesInACategory

func (s *ServiceHandler) GetServicesInACategory(c *gin.Context)

@Summary Get Services @Description A call to this path along with the category id as parameter will result in the listing of all active services under that category @Tags Admin @Accept json @Produce json @Security Bearer @Param category_id query string true "category-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/services [get]

func (*ServiceHandler) ListCommittedWorks

func (s *ServiceHandler) ListCommittedWorks(c *gin.Context)

@Summary Get Committed Works @Description A call to this path will result in the listing of all committed works that havent been completed @Tags Admin @Accept json @Produce json @Security Bearer @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/work/committed [get]

func (*ServiceHandler) ListCompletedWorks

func (s *ServiceHandler) ListCompletedWorks(c *gin.Context)

@Summary Get Completed Works @Description A call to this path will result in the listing of all completed works @Tags Admin @Accept json @Produce json @Security Bearer @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/work/completed [get]

func (*ServiceHandler) ReActivateService

func (s *ServiceHandler) ReActivateService(c *gin.Context)

@Summary Reactivate service @Description A call to this path along with the service id as parameter will result in the re activation of that service @Tags Admin @Accept json @Produce json @Security Bearer @Param service_id query string true "service-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/services [patch]

type UserManagementHandler

type UserManagementHandler struct {
	// contains filtered or unexported fields
}

func (*UserManagementHandler) BlockUser

func (u *UserManagementHandler) BlockUser(c *gin.Context)

@Summary Block User @Description A call to this path along with the user id as parameter will result in the blocking of the user @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "user-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/user [delete]

func (*UserManagementHandler) GetAllPendingVerifications

func (u *UserManagementHandler) GetAllPendingVerifications(c *gin.Context)

@Summary Get All Pending Verifications @Description A call to this path will result in the listing of all providers request for verification which has not been accepted yet @Tags Admin @Accept json @Produce json @Security Bearer @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/verify [get]

func (*UserManagementHandler) GetProviders

func (u *UserManagementHandler) GetProviders(c *gin.Context)

@Summary Get Providers @Description A call to this path will result in the listing of all providers that have registered in procast @Tags Admin @Accept json @Produce json @Security Bearer @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/provider [get]

func (*UserManagementHandler) GetUsers

func (u *UserManagementHandler) GetUsers(c *gin.Context)

@Summary Get Users @Description A call to this path will result in the listing of all users of application @Tags Admin @Accept json @Produce json @Security Bearer @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/user [get]

func (*UserManagementHandler) MakeProviderVerified

func (u *UserManagementHandler) MakeProviderVerified(c *gin.Context)

@Summary Verify Provider @Description A call to this path along with the provider id as parameter will result in the verification of the provider @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "provider-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/provider [patch]

func (*UserManagementHandler) RevokeVerification

func (u *UserManagementHandler) RevokeVerification(c *gin.Context)

@Summary Revoke Verification From Provider @Description A call to this path along with the provider id as parameter will result in the revoking verification of the provider @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "provider-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/provider [delete]

func (*UserManagementHandler) UnBlockUser

func (u *UserManagementHandler) UnBlockUser(c *gin.Context)

@Summary UnBlock User @Description A call to this path along with the user id as parameter will result in the unblocking of user @Tags Admin @Accept json @Produce json @Security Bearer @Param id query string true "provider-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/user [patch]

func (*UserManagementHandler) ViewVerificationRequest

func (u *UserManagementHandler) ViewVerificationRequest(c *gin.Context)

@Summary Get Verification Request @Description A call to this path along with the provider id will result in the displaying of the verification request of a provider @Tags Admin @Accept json @Produce json @Security Bearer @Param pro_id query string true "pro-id" @Success 200 {object} response.Response{} @Failure 500 {object} response.Response{} @Router /admin/verify/request [get]

Jump to

Keyboard shortcuts

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