v1

package
v0.0.0-...-17e6f81 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB       *gorm.DB
	Redis    *storage.RedisClient
	Logger   *logger.Logger
	EmailCfg = utils.EmailConfig{
		SMTPHost:     "0.0.0.0",
		SMTPPort:     1025,
		SMTPUsername: "",
		SMTPPassword: "",
		AppURL:       "http://localhost:3000",
		FromEmail:    "no-reply@devpulse.com",
	}
	Validator = utils.NewValidator()
)

Functions

func ActivateUser

func ActivateUser(c *fiber.Ctx) error

ActivateUser verifies OTP and activates the user

func DeleteUserAccount

func DeleteUserAccount(c *fiber.Ctx) error

DeleteUserAccount deletes the authenticated user's account with Redis optimization

func FollowUser

func FollowUser(c *fiber.Ctx) error

FollowUser follows a user

func ForgotPassword

func ForgotPassword(c *fiber.Ctx) error

ForgotPassword handles the password reset request

func GetProfile

func GetProfile(c *fiber.Ctx) error

UserProfile retrieves and returns the authenticated user’s profile, optimized with Redis caching

func GetUserBadges

func GetUserBadges(c *fiber.Ctx) error

GetUserBadges returns user badges

func GetUserByUsername

func GetUserByUsername(c *fiber.Ctx) error

GetUserByUsername returns a user by username

func GetUserFollowers

func GetUserFollowers(c *fiber.Ctx) error

GetUserFollowers returns user followers

func GetUserFollowing

func GetUserFollowing(c *fiber.Ctx) error

GetUserFollowing returns user following

func GetUserNotificationID

func GetUserNotificationID(c *fiber.Ctx) error

GetUserNotificationID returns user notification by ID

func GetUserNotifications

func GetUserNotifications(c *fiber.Ctx) error

GetUserNotifications returns user notifications

func GetUserStats

func GetUserStats(c *fiber.Ctx) error

GetUserStats returns user statistics

func Login

func Login(c *fiber.Ctx) error

Login ensures user can login to his account.

func Logout

func Logout(c *fiber.Ctx) error

Logout ensures user logged out from the server.

func NotImplemented

func NotImplemented(c *fiber.Ctx) error

NotImplemented is a placeholder for unimplemented routes

func RateLimitting

func RateLimitting(c *fiber.Ctx, userID string, rateTTL time.Duration, maxUpdates int, prefix string) bool

func Refresh

func Refresh(c *fiber.Ctx) error

func Register

func Register(c *fiber.Ctx) error

func ResetPassword

func ResetPassword(c *fiber.Ctx) error

ResetPassword handles the password reset process

func UnfollowUser

func UnfollowUser(c *fiber.Ctx) error

UnfollowUser unfollows a user

func UpdateUserAccount

func UpdateUserAccount(c *fiber.Ctx) error

UpdateUserAccount updates the user's account

func UpdateUserCustomization

func UpdateUserCustomization(c *fiber.Ctx) error

UpdateUserCustomization updates the user's customiztion

func UpdateUserNotificationPrefrences

func UpdateUserNotificationPrefrences(c *fiber.Ctx) error

UpdateUserNotificationPrefrences updates the user's notification preferences

func UpdateUserProfile

func UpdateUserProfile(c *fiber.Ctx) error

UpdateUserProfile updates the authenticated user’s profile with Redis caching and single-query perfection

Types

This section is empty.

Jump to

Keyboard shortcuts

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