controllers

package
v0.0.0-...-aef9128 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateRecommendations

func GenerateRecommendations(c *gin.Context)

Types

type MoodController

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

func NewMoodController

func NewMoodController(moodService services.MoodServiceInterface) *MoodController

NewMoodController creates a new MoodController

func (*MoodController) CreateGenericAttribute

func (mc *MoodController) CreateGenericAttribute(c *gin.Context)

CreateGenericAttribute handles creating a generic attribute.

func (*MoodController) CreateMoodEntry

func (mc *MoodController) CreateMoodEntry(c *gin.Context)

CreateMoodEntry handles mood entry creation.

func (*MoodController) DeleteMoodEntry

func (mc *MoodController) DeleteMoodEntry(c *gin.Context)

DeleteMoodEntry handles deleting a mood entry.

func (*MoodController) GetGenericAttributes

func (mc *MoodController) GetGenericAttributes(c *gin.Context)

GetAttributes handles getting all attributes.

func (*MoodController) GetSingleUserMoodEntry

func (mc *MoodController) GetSingleUserMoodEntry(c *gin.Context)

GetSingleUserMoodEntry handles getting a single mood entry for a user.

func (*MoodController) GetUserMoodEntries

func (mc *MoodController) GetUserMoodEntries(c *gin.Context)

GetUserMoodEntries handles getting mood entries for a user.

func (*MoodController) UpdateUserMoodEntry

func (mc *MoodController) UpdateUserMoodEntry(c *gin.Context)

UpdateUserMoodEntry handles mood entry updates.

type ResourceController

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

func NewResourceController

func NewResourceController(resourceService services.ResourceServiceInterface) *ResourceController

func (*ResourceController) AddReview

func (mc *ResourceController) AddReview(c *gin.Context)

AddReview adds a review to a resource.

func (*ResourceController) CreateResourceEntry

func (mc *ResourceController) CreateResourceEntry(c *gin.Context)

CreateResourceEntry creates a new resource entry in the database.

func (*ResourceController) DeleteResourceEntry

func (mc *ResourceController) DeleteResourceEntry(c *gin.Context)

DeleteResourceEntry handles deleting a resource entry. Only the owner or an admin can delete a resource.

func (*ResourceController) GetAllResources

func (mc *ResourceController) GetAllResources(c *gin.Context)

GetAllResources gets all the resources in the database.

func (*ResourceController) GetResourceByID

func (mc *ResourceController) GetResourceByID(c *gin.Context)

GetResourceByID gets a resource by its ID.

type UserController

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

func NewUserController

func NewUserController(authService services.AuthServiceInterface) *UserController

func (*UserController) DeleteAccount

func (uc *UserController) DeleteAccount(c *gin.Context)

func (*UserController) ForgotPasswordRequest

func (uc *UserController) ForgotPasswordRequest(c *gin.Context)

ForgotPasswordRequest handles forgot password requests by sending a mail with an OTP

func (*UserController) GoogleCallback

func (uc *UserController) GoogleCallback(c *gin.Context)

not used GoogleCallback handles the callback from google oauth2

func (*UserController) GoogleLogin

func (uc *UserController) GoogleLogin(c *gin.Context)

not used GoogleLogin initiates google oauth2 flow

func (*UserController) Login

func (uc *UserController) Login(c *gin.Context)

Login handles user login.

func (*UserController) RegisterUser

func (uc *UserController) RegisterUser(c *gin.Context)

RegisterUser handles user registration.

func (*UserController) RequestDeletion

func (uc *UserController) RequestDeletion(c *gin.Context)

func (*UserController) RequestVerificationAgain

func (uc *UserController) RequestVerificationAgain(c *gin.Context)

RequestVerificationAgain handles request to resend verification email.

func (*UserController) ResetPassword

func (uc *UserController) ResetPassword(c *gin.Context)

ResetPasswordController handles the reset password by logged in user

func (*UserController) SetNewPassword

func (uc *UserController) SetNewPassword(c *gin.Context)

SetNewPassword sets a new password for the user after forgot password request

func (*UserController) TestAuth

func (uc *UserController) TestAuth(c *gin.Context)

TestAuth is a test function to check if the auth middleware is working

func (*UserController) VerifyEmail

func (uc *UserController) VerifyEmail(c *gin.Context)

Jump to

Keyboard shortcuts

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