package
0.0.0-20240728120420-5df9c1d22f7a
Repository: https://github.com/wwi21seb-projekt/server-beta.git
Documentation: pkg.go.dev

# Functions

CensorEmail censors the email address for the response converts [email protected] to tes*****@gmail.com.
CheckPassword checks if a given password matches with the given hash (contains salt).
ExtractHashtags extracts all hashtags from a given text and returns them as a slice of strings.
FormatImageUrl formats the image url for the response adds the base url with image id and file extension.
GenerateAccessToken generates new access jwt token with user id claim for 3 hours validity.
GenerateImageMetadataDTOFromImage generates an ImageMetadataDTO from an Image and returns nil if the Image is nil.
GenerateLocationDTOFromLocation generates a LocationDTO from a Location and returns nil if the Location is nil.
GenerateRefreshToken generates new refresh jwt token with user id claim for one week validity.
GenerateSixDigitCode generates a code that is used for email verification.
GenerateUserDTOFromUser generates a UserDTO from a User and returns nil if the User is nil This function is used multiple times in the services to easily convert a User to a DTO with correct image wrapping.
GetActivationEmailBody returns the HTML body for an activation email sending the activation code.
GetPasswordResetEmailBody returns the HTML body for a password reset email.
GetWelcomeEmailBody returns the HTML body for a welcome email.
HashPassword hashes a given password with a random salt and returns hash.
No description provided by the author
VerifyJWTToken verifies given token and returns username and true if token is refresh token.

# Structs

No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author