handler

package
v0.0.0-...-192c46a Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHandler

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

func NewAuthHandler

func NewAuthHandler(authService *service.AuthService) *AuthHandler

func (*AuthHandler) LogIn

func (a *AuthHandler) LogIn(c *fiber.Ctx) error

func (*AuthHandler) LogInAdmin

func (a *AuthHandler) LogInAdmin(c *fiber.Ctx) error

func (*AuthHandler) LogOut

func (a *AuthHandler) LogOut(c *fiber.Ctx) error

func (*AuthHandler) LogOutAdmin

func (a *AuthHandler) LogOutAdmin(c *fiber.Ctx) error

func (*AuthHandler) SignUp

func (a *AuthHandler) SignUp(c *fiber.Ctx) error

type EventHandler

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

func NewEventHandler

func NewEventHandler(eventService service.EventService) EventHandler

NewEventHandler creates a new eventHandler

func (EventHandler) CreateEvent

func (h EventHandler) CreateEvent(c *fiber.Ctx) error

@Summary Create a new event @Description Create a new event for a specific organization @Tags Organization Events @Accept multipart/form-data @Accept json @Produce json @Param orgID path int true "Organization ID" @Param event body dto.NewEventRequest false "Example of Event JSON body (required in the formData `event`)" @Param event formData string true "Event JSON" @Param image formData file true "Event image" @Success 201 {object} dto.EventResponses @Failure 400 {object} map[string]string "error: Invalid input" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/events [post]

func (EventHandler) DeleteEvent

func (h EventHandler) DeleteEvent(c *fiber.Ctx) error

@Summary Delete an eventh @Description Deletes an event for a given organization and event ID. @Tags Organization Events @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Event ID" @Success 200 {object} map[string]string "message: event deleted successfully" @Failure 400 {object} map[string]string "error: Invalid parameters" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/events/{id} [delete]

func (EventHandler) EventPaginate

func (h EventHandler) EventPaginate(c *fiber.Ctx) error

@Summary Paginate events @Description Get a paginated list of events @Tags Events @Produce json @Param page query int true "Page number" @Success 200 {object} dto.PaginatedEventsResponse @Failure 400 {object} map[string]string "error: Invalid parameters" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /events-paginate [get]

func (EventHandler) GetEventByID

func (h EventHandler) GetEventByID(c *fiber.Ctx) error

func (EventHandler) GetEventByIDwithOrgID

func (h EventHandler) GetEventByIDwithOrgID(c *fiber.Ctx) error

@Summary Get an event by ID @Description Get an event by its ID for a specific organization @Tags Organization Events @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Event ID" @Success 200 {object} []dto.EventResponses @Failure 400 {object} map[string]string "error: Invalid parameters" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/events/{id} [get]

func (EventHandler) GetNumberOfEvents

func (h EventHandler) GetNumberOfEvents(c *fiber.Ctx) error

func (EventHandler) ListAllCategories

func (h EventHandler) ListAllCategories(c *fiber.Ctx) error

@Summary List all categories @Description Get a list of all event categories @Tags Events @Produce json @Success 200 {object} dto.CategoryListResponse @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /categories [get]

func (EventHandler) ListEvents

func (h EventHandler) ListEvents(c *fiber.Ctx) error

@Summary List all events @Description Get a list of all events @Tags Events @Produce json @Success 200 {array} []dto.EventResponses @Failure 404 {object} map[string]string "error: events not found" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /events [get]

func (EventHandler) ListEventsByOrgID

func (h EventHandler) ListEventsByOrgID(c *fiber.Ctx) error

@Summary List all events for a specific organization @Description Get a list of all events for a specific organization @Tags Organization Events @Produce json @Param orgID path int true "Organization ID" @Success 200 {array} []dto.EventResponses @Failure 400 {object} map[string]string "error: Invalid parameters" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/events [get]

func (EventHandler) SearchEvents

func (h EventHandler) SearchEvents(c *fiber.Ctx) error

SearchEvents godoc @Summary Search events @Description Search events by keyword @Tags Events @Accept json @Produce json @Param q query string true "Keyword to search for events" @Param category query string true "Category of events: all, incubation, exhibition, competition, etc." @Param locationType query string false "Location Type of events" @Param audience query string false "Main Audience of events" @Param price query string false "Price Type of events" @Success 200 {array} []dto.EventResponses @Failure 400 {object} map[string]string "error - Invalid query parameters" @Failure 404 {object} map[string]string "error - events not found" @Failure 500 {object} map[string]string "error - Internal Server Error" @Router /events-paginate/search [get]

func (EventHandler) SyncEvents

func (h EventHandler) SyncEvents(c *fiber.Ctx) error

func (EventHandler) UpdateEvent

func (h EventHandler) UpdateEvent(c *fiber.Ctx) error

@Summary Update an event @Description Update an event with the given ID for the specified organization @Tags Organization Events @Accept multipart/form-data @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Event ID" @Param event body dto.NewEventRequest false "Example of Event JSON body (required in the formData `event`)" @Param event formData string true "Event JSON" @Param image formData file false "Event image" @Success 200 {object} dto.EventResponses @Failure 400 {object} map[string]string "error: Invalid json body parameters" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/events/{id} [put]

type EventShortResponse

type EventShortResponse struct {
	ID        int    `json:"id"`
	Name      string `json:"name"`
	StartDate string `json:"startDate"`
	EndDate   string `json:"endDate"`
	StartTime string `json:"startTime"`
	EndTime   string `json:"endTime"`
	PicUrl    string `json:"picUrl"`
	Location  string `json:"location"`
}

type LocationMapHandler

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

func NewLocationMapHandler

func NewLocationMapHandler(locationService service.LocationService) *LocationMapHandler

func (*LocationMapHandler) GetAllEventLocation

func (l *LocationMapHandler) GetAllEventLocation(c *fiber.Ctx) error

func (*LocationMapHandler) GetAllOrganizationLocation

func (l *LocationMapHandler) GetAllOrganizationLocation(c *fiber.Ctx) error

func (*LocationMapHandler) GetEventLocationByEventID

func (l *LocationMapHandler) GetEventLocationByEventID(c *fiber.Ctx) error

func (*LocationMapHandler) GetEventLocationByOrgID

func (l *LocationMapHandler) GetEventLocationByOrgID(c *fiber.Ctx) error

func (*LocationMapHandler) GetOrganizationLocationByOrgID

func (l *LocationMapHandler) GetOrganizationLocationByOrgID(c *fiber.Ctx) error

type OauthHandler

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

func NewOauthHandler

func NewOauthHandler(oauthService *service.OauthService) *OauthHandler

func (*OauthHandler) AdminGoogleCallback

func (h *OauthHandler) AdminGoogleCallback(c *fiber.Ctx) error

func (*OauthHandler) GoogleCallback

func (h *OauthHandler) GoogleCallback(c *fiber.Ctx) error

GoogleCallback handles the callback from Google

func (*OauthHandler) Me

func (h *OauthHandler) Me(c *fiber.Ctx) error

type OrgOpenJobHandler

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

func NewOrgOpenJobHandler

func NewOrgOpenJobHandler(service service.OrgOpenJobService) *OrgOpenJobHandler

Constructor

func (*OrgOpenJobHandler) CreateOrgOpenJob

func (h *OrgOpenJobHandler) CreateOrgOpenJob(c *fiber.Ctx) error

@Summary Create a new organization open job @Description Create a new organization open job @Tags Organization Job @Accept multipart/form-data @Accept json @Produce json @Param orgID path int true "Organization ID" @Param job body dto.JobRequest false "Example body of Job JSON (required in the formData `job`)" @Param job formData string true "Job JSON" @Param image formData file true "Organization Image" @Success 201 {object} map[string]string "message: Job created successfully" @Failure 400 {object} map[string]string "Bad Request - json body is required or invalid / job title is required" @Failure 500 {object} map[string]string "Internal Server Error - Internal Server Error" @Router /orgs/{orgID}/jobs/create [post]

func (*OrgOpenJobHandler) CreatePrerequisite

func (h *OrgOpenJobHandler) CreatePrerequisite(c *fiber.Ctx) error

func (*OrgOpenJobHandler) DeleteOrgOpenJob

func (h *OrgOpenJobHandler) DeleteOrgOpenJob(c *fiber.Ctx) error

@Summary Delete an organization job by ID @Description Delete an organization job by ID @Tags Organization Job @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Job ID" @Success 200 {object} nil @Failure 400 {object} map[string]string "error: Bad Request - organization id & job id is required" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/jobs/delete/{id} [delete]

func (*OrgOpenJobHandler) DeletePrerequisite

func (h *OrgOpenJobHandler) DeletePrerequisite(c *fiber.Ctx) error

func (*OrgOpenJobHandler) GetAllPrerequisites

func (h *OrgOpenJobHandler) GetAllPrerequisites(c *fiber.Ctx) error

func (*OrgOpenJobHandler) GetAllPrerequisitesByJobID

func (h *OrgOpenJobHandler) GetAllPrerequisitesByJobID(c *fiber.Ctx) error

func (*OrgOpenJobHandler) GetJobByID

func (h *OrgOpenJobHandler) GetJobByID(c *fiber.Ctx) error

func (*OrgOpenJobHandler) GetNumberOfJobs

func (h *OrgOpenJobHandler) GetNumberOfJobs(c *fiber.Ctx) error

func (*OrgOpenJobHandler) GetOrgOpenJobByIDwithOrgID

func (h *OrgOpenJobHandler) GetOrgOpenJobByIDwithOrgID(c *fiber.Ctx) error

@Summary Get an organization open job by ID @Description Get an organization open job by ID @Tags Organization Job @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Job ID" @Success 200 {object} dto.JobResponses @Failure 400 {object} map[string]string "error: Bad Request - organization id & job id is required" @Failure 404 {object} map[string]string "error: jobs not found" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/jobs/get/{id} [get]

func (*OrgOpenJobHandler) GetPaginateOrgOpenJob

func (h *OrgOpenJobHandler) GetPaginateOrgOpenJob(c *fiber.Ctx) error

func (*OrgOpenJobHandler) GetPrerequisiteByID

func (h *OrgOpenJobHandler) GetPrerequisiteByID(c *fiber.Ctx) error

func (*OrgOpenJobHandler) ListAllOrganizationJobs

func (h *OrgOpenJobHandler) ListAllOrganizationJobs(c *fiber.Ctx) error

@Summary List all organization jobs @Description Get all organization jobs @Tags Organization Job @Accept json @Produce json @Success 200 {array} dto.JobResponses @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/jobs/list/all [get]

func (*OrgOpenJobHandler) ListOrgOpenJobsByOrgID

func (h *OrgOpenJobHandler) ListOrgOpenJobsByOrgID(c *fiber.Ctx) error

@Summary List all jobs of its organization @Description Get all organization open jobs @Tags Organization Job @Accept json @Produce json @Param orgID path int true "Organization ID" @Success 200 {array} dto.JobResponses @Failure 400 {object} map[string]string "error: Bad Request - organization id is required" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/jobs/list [get]

func (*OrgOpenJobHandler) SearchJobs

func (h *OrgOpenJobHandler) SearchJobs(c *fiber.Ctx) error

SearchJobs handles the search for job postings based on the provided query parameters. @Summary Search for job postings @Description Search for job postings using various query parameters such as page and offset for pagination. @Tags Organization Job @Accept json @Produce json @Param q query string true "Keyword to search for jobs (Support: title, description, location, organization)" @Param categories query string true "Category of jobs: all, environment, social, governance" @Param workplace query string false "Workplace of jobs: remote" @Param workType query string false "Work type of jobs: fulltime" @Param careerStage query string false "Career stage of jobs: entrylevel" @Param salaryLowerBound query float64 false "Salary lower bound" @Param salaryUpperBound query float64 false "Salary upper bound" @Param page query int false "Page number for pagination" default(1) @Param offset query int false "Number of items per page" default(12) @Success 200 {object} []dto.JobResponses @Failure 400 {object} map[string]string "error: Bad Request - invalid query parameters" @Failure 500 {object} map[string]string "error: Bad Request - Internal Server Error" @Router /jobs-paginate/search [get]

func (*OrgOpenJobHandler) SyncJobs

func (h *OrgOpenJobHandler) SyncJobs(c *fiber.Ctx) error

func (*OrgOpenJobHandler) UpdateOrgOpenJob

func (h *OrgOpenJobHandler) UpdateOrgOpenJob(c *fiber.Ctx) error

@Summary Update an organization open job by ID @Description Update an organization open job by ID @Tags Organization Job @Accept multipart/form-data @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Job ID" @Param job body dto.JobRequest true "Example body of Job JSON (required in the formData `job`)" @Param job formData string true "Job JSON" @Param image formData file false "Job Image" @Success 200 {object} dto.JobResponses @Failure 400 {object} map[string]string "error: Bad Request - organization id & job id is required" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/{orgID}/jobs/update/{id} [put]

func (*OrgOpenJobHandler) UpdatePrerequisite

func (h *OrgOpenJobHandler) UpdatePrerequisite(c *fiber.Ctx) error

type OrganizationContactHandler

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

func (*OrganizationContactHandler) CreateContact

func (h *OrganizationContactHandler) CreateContact(c *fiber.Ctx) error

@Summary Create a new organization contact @Description Create a new organization contact @Tags Organization Contacts @Accept json @Produce json @Param orgID path int true "Organization ID" @Success 200 {object} map[string]string "message: Contact created successfully" @Failure 400 {object} map[string]string "error: Bad Request - json body is required or invalid / contact media is required" @Failure 500 {object} map[string]string "error: Internal Server Error - Internal Server Error" @Router /orgs/{orgID}/contacts/create [post]

func (*OrganizationContactHandler) DeleteContact

func (h *OrganizationContactHandler) DeleteContact(c *fiber.Ctx) error

@Summary Create a new organization contact @Description Create a new organization contact @Tags Organization Contacts @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Contact ID" @Success 200 {object} nil @Failure 400 {object} map[string]string "error: Bad Request - organization id & contact id is required" @Failure 500 {object} map[string]string "error: Internal Server Error - Internal Server Error" @Router /orgs/{orgID}/contacts/delete/{id} [delete]

func (*OrganizationContactHandler) GetAllContactsByOrgID

func (h *OrganizationContactHandler) GetAllContactsByOrgID(c *fiber.Ctx) error

@Summary Create a new organization contact @Description Create a new organization contact @Tags Organization Contacts @Accept json @Produce json @Param orgID path int true "Organization ID" @Success 200 {array} dto.OrganizationContactResponses @Failure 400 {object} map[string]string "error: Bad Request - organization id is required" @Failure 500 {object} map[string]string "error: Internal Server Error - Internal Server Error" @Router /orgs/{orgID}/contacts/list [get]

func (*OrganizationContactHandler) GetContactByID

func (h *OrganizationContactHandler) GetContactByID(c *fiber.Ctx) error

@Summary Create a new organization contact @Description Create a new organization contact @Tags Organization Contacts @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Contact ID" @Success 200 {object} dto.OrganizationContactResponses @Failure 400 {object} map[string]string "error: Bad Request - organization id & contact id is required" @Failure 404 {object} map[string]string "error: contact not found" @Failure 500 {object} map[string]string "error: Internal Server Error - Internal Server Error" @Router /orgs/{orgID}/contacts/get/{id} [get]

func (*OrganizationContactHandler) UpdateContact

func (h *OrganizationContactHandler) UpdateContact(c *fiber.Ctx) error

@Summary Create a new organization contact @Description Create a new organization contact @Tags Organization Contacts @Accept json @Produce json @Param orgID path int true "Organization ID" @Param id path int true "Contact ID" @Param org body dto.OrganizationContactRequest true "Organization Contact" @Success 200 {object} dto.OrganizationContactResponses @Failure 400 {object} map[string]string "error: Bad Request - organization id & contact id is required" @Failure 500 {object} map[string]string "error: Internal Server Error - Internal Server Error" @Router /orgs/{orgID}/contacts/update/{id} [put]

type OrganizationHandler

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

func NewOrganizationHandler

func NewOrganizationHandler(service service.OrganizationService) *OrganizationHandler

Constructor

func (*OrganizationHandler) CreateOrganization

func (h *OrganizationHandler) CreateOrganization(c *fiber.Ctx) error

@Summary Create a new organization @Description Create a new organization BUT still not create the Contact and OpenJob @Tags Organization @Accept multipart/form-data @Accept json @Produce json @Param org body dto.OrganizationRequest false "Example body for Organization JSON (required in the formData `org`)" @Param org formData string true "Organization JSON" @Param image formData file true "Organization Image" @Success 201 {object} models.Organization @Failure 400 {object} map[string]string "error: Bad Request" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/create [post]

func (*OrganizationHandler) DeleteOrganization

func (h *OrganizationHandler) DeleteOrganization(c *fiber.Ctx) error

@Summary Delete an organization by ID @Description Delete an organization by ID @Tags Organization @Accept json @Produce json @Param id path int true "Organization ID" @Success 200 {object} nil @Failure 400 {object} map[string]string "error: Bad Request - organization id is required" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/delete/{id} [delete]

func (*OrganizationHandler) GetOrganizationByID

func (h *OrganizationHandler) GetOrganizationByID(c *fiber.Ctx) error

@Summary Get an organization by ID @Description Get an organization by ID @Tags Organization @Accept json @Produce json @Param id path int true "Organization ID" @Success 200 {object} dto.OrganizationResponse @Failure 400 {object} map[string]string "error: organization id is required" @Failure 404 {object} map[string]string "error: organization not found" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/get/{id} [get]

func (*OrganizationHandler) GetOrganizationPaginate

func (h *OrganizationHandler) GetOrganizationPaginate(c *fiber.Ctx) error

@Summary Get a page of organizations @Description Get a page of organizations @Tags Organization @Accept json @Produce json @Param page query int false "Page number" @Success 200 {array} dto.EventShortResponseDTO @Failure 400 {object} map[string]string "error: invalid page" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/paginate [get]

func (*OrganizationHandler) ListIndustries

func (h *OrganizationHandler) ListIndustries(c *fiber.Ctx) error

func (*OrganizationHandler) ListOrganizations

func (h *OrganizationHandler) ListOrganizations(c *fiber.Ctx) error

@Summary List all organizations @Description Get all organizations @Tags Organization @Accept json @Produce json @Success 200 {array} dto.OrganizationResponse @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/list [get]

func (*OrganizationHandler) UpdateOrganization

func (h *OrganizationHandler) UpdateOrganization(c *fiber.Ctx) error

@Summary Update an organization by ID @Description Update an organization by ID @Tags Organization @Accept multipart/form-data @Accept json @Produce json @Param id path int true "Organization ID" @Param org body dto.OrganizationRequest false "Example body for Organization JSON (required in the formData `org`)" @Param org formData string true "Organization JSON" @Param image formData file true "Organization Image" @Success 200 {object} models.Organization @Failure 400 {object} map[string]string "error: Bad Request - json body is required or invalid / organization name is required" @Failure 500 {object} map[string]string "error: Internal Server Error" @Router /orgs/update/{id} [put]

func (*OrganizationHandler) UpdateOrganizationStatus

func (h *OrganizationHandler) UpdateOrganizationStatus(c *fiber.Ctx) error

type PolicyHandler

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

func NewPolicyHandler

func NewPolicyHandler(policyRoleService service.PolicyRoleService) *PolicyHandler

func (*PolicyHandler) AddPoliciesForRoleInDomain

func (p *PolicyHandler) AddPoliciesForRoleInDomain(c *fiber.Ctx) error

func (*PolicyHandler) AddPolicyForRoleInDomain

func (p *PolicyHandler) AddPolicyForRoleInDomain(c *fiber.Ctx) error

func (*PolicyHandler) DeletePoliciesForRoleInDomain

func (p *PolicyHandler) DeletePoliciesForRoleInDomain(c *fiber.Ctx) error

func (*PolicyHandler) DeletePolicyForRoleInDomain

func (p *PolicyHandler) DeletePolicyForRoleInDomain(c *fiber.Ctx) error

func (*PolicyHandler) GetPoliciesForRoleInDomain

func (p *PolicyHandler) GetPoliciesForRoleInDomain(c *fiber.Ctx) error

func (*PolicyHandler) GetRolesForPolicyInDomain

func (p *PolicyHandler) GetRolesForPolicyInDomain(c *fiber.Ctx) error

type RoleHandler

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

func NewRoleHandler

func NewRoleHandler(roleWithDomainService service.RoleService) *RoleHandler

func (*RoleHandler) CallBackInvitationForMember

func (r *RoleHandler) CallBackInvitationForMember(c *fiber.Ctx) error

func (*RoleHandler) DeleteDomain

func (r *RoleHandler) DeleteDomain(c *fiber.Ctx) error

func (*RoleHandler) DeleteMember

func (r *RoleHandler) DeleteMember(c *fiber.Ctx) error

func (*RoleHandler) GetAllUsersWithRoleByDomain

func (r *RoleHandler) GetAllUsersWithRoleByDomain(c *fiber.Ctx) error

func (*RoleHandler) GetDomainsByUser

func (r *RoleHandler) GetDomainsByUser(c *fiber.Ctx) error

func (*RoleHandler) GetNumberOfMember

func (r *RoleHandler) GetNumberOfMember(c *fiber.Ctx) error

func (*RoleHandler) GetRolesForUserInDomain

func (r *RoleHandler) GetRolesForUserInDomain(c *fiber.Ctx) error

func (*RoleHandler) InvitationForMember

func (r *RoleHandler) InvitationForMember(c *fiber.Ctx) error

func (*RoleHandler) UpdateRoleToEnforcer

func (r *RoleHandler) UpdateRoleToEnforcer(c *fiber.Ctx) error

func (*RoleHandler) UpdateRolesForUserInDomain

func (r *RoleHandler) UpdateRolesForUserInDomain(c *fiber.Ctx) error

type SignUpHandlerRequest

type SignUpHandlerRequest struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Phone    string `json:"phone"`
}

type UserHandler

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

func NewUserHandler

func NewUserHandler(service service.UserService) *UserHandler

func (*UserHandler) CreateUser

func (h *UserHandler) CreateUser(c *fiber.Ctx) error

@Summary Create a new user @Description Create a new user @Tags Users @Accept json @Produce json @Param user body models.User true "User object" @Success 201 {object} models.User @Failure 400 {object} fiber.Map "Bad request - Invalid user object" @Failure 500 {object} fiber.Map "Internal server error - Failed to create user" @Router /users [post]

func (*UserHandler) GetCurrentUser

func (h *UserHandler) GetCurrentUser(c *fiber.Ctx) error

@Summary Get current user profile @Description Get current user profile @Tags users @Accept json @Produce json @Security BearerAuth @Success 200 {object} domain.Profile @Failure 400 {object} map[string]interface{} @Failure 401 {object} map[string]interface{} @Failure 500 {object} map[string]interface{} @Router /users/me [get]

func (*UserHandler) ListUsers

func (h *UserHandler) ListUsers(c *fiber.Ctx) error

@Summary List all users @Description List all users @Tags Users @Accept json @Produce json @Success 200 {array} models.User @Failure 500 {object} fiber.Map "Internal server error - Internal Server Error" @Router /users [get]

func (*UserHandler) UploadProfilePicture

func (h *UserHandler) UploadProfilePicture(c *fiber.Ctx) error

@Summary Upload profile picture @Description Upload profile picture for a user @Tags Users @Accept multipart/form-data @Produce json @Param id path string true "User ID" @Param image formData file true "Profile picture file" @Success 200 {object} dto.UploadResponse "Uploaded image URL" @Failure 400 {object} fiber.Map "Bad request - Invalid file/user ID" @Failure 500 {object} fiber.Map "Internal server error - Failed to update profile picture" @Router /users/{id}/upload-profile [post]

type UserInteractEventHandler

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

func (*UserInteractEventHandler) GetAllInteractedEventPerUser

func (h *UserInteractEventHandler) GetAllInteractedEventPerUser(c *fiber.Ctx) error

func (*UserInteractEventHandler) GetAllStatUserInteractCategories

func (h *UserInteractEventHandler) GetAllStatUserInteractCategories(c *fiber.Ctx) error

func (*UserInteractEventHandler) GetAllUserInteractEvent

func (h *UserInteractEventHandler) GetAllUserInteractEvent(c *fiber.Ctx) error

func (*UserInteractEventHandler) GetStatUserInteractCategoriesByUserID

func (h *UserInteractEventHandler) GetStatUserInteractCategoriesByUserID(c *fiber.Ctx) error

func (*UserInteractEventHandler) GetUserInteractEventsByUserID

func (h *UserInteractEventHandler) GetUserInteractEventsByUserID(c *fiber.Ctx) error

func (*UserInteractEventHandler) InterestedInTheEvent

func (h *UserInteractEventHandler) InterestedInTheEvent(c *fiber.Ctx) error

type UserInteractHandler

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

func NewUserInteractHandler

func NewUserInteractHandler(service service.UserInteractService) *UserInteractHandler

func (*UserInteractHandler) GetAllUserInteract

func (h *UserInteractHandler) GetAllUserInteract(c *fiber.Ctx) error

func (*UserInteractHandler) GetUserInteractByCategoryID

func (h *UserInteractHandler) GetUserInteractByCategoryID(c *fiber.Ctx) error

func (*UserInteractHandler) GetUserInteractByUserID

func (h *UserInteractHandler) GetUserInteractByUserID(c *fiber.Ctx) error

func (*UserInteractHandler) InterestedInTheEvent

func (h *UserInteractHandler) InterestedInTheEvent(c *fiber.Ctx) error

type UserPreferenceHandler

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

func NewUserPreferenceHandler

func NewUserPreferenceHandler(service service.UserPreferenceService) *UserPreferenceHandler

func (*UserPreferenceHandler) CreateUserPreference

func (h *UserPreferenceHandler) CreateUserPreference(c *fiber.Ctx) error

func (*UserPreferenceHandler) DeleteUserPreference

func (h *UserPreferenceHandler) DeleteUserPreference(c *fiber.Ctx) error

func (*UserPreferenceHandler) GetUserPreferenceByUserID

func (h *UserPreferenceHandler) GetUserPreferenceByUserID(c *fiber.Ctx) error

func (*UserPreferenceHandler) ListEventTrainingPreference

func (h *UserPreferenceHandler) ListEventTrainingPreference(c *fiber.Ctx) error

func (*UserPreferenceHandler) ListUserPreferences

func (h *UserPreferenceHandler) ListUserPreferences(c *fiber.Ctx) error

func (*UserPreferenceHandler) UpdateUserPreference

func (h *UserPreferenceHandler) UpdateUserPreference(c *fiber.Ctx) error

Jump to

Keyboard shortcuts

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