Documentation ¶
Index ¶
- Variables
- func AddAdmin(c *fiber.Ctx) error
- func AddUploadCoverPic(c *fiber.Ctx) error
- func AddUploadProfilePic(c *fiber.Ctx) error
- func DeleteCoverPic(c *fiber.Ctx) error
- func DeleteProfilePic(c *fiber.Ctx) error
- func GenerateJWT(userDetails models.User, ExpiresAt *jwt.NumericDate, IssuedAt *jwt.NumericDate) (string, error)
- func GetAdmins(c *fiber.Ctx) error
- func GetCoverPic(c *fiber.Ctx) error
- func GetProfile(c *fiber.Ctx) error
- func GetProfilePic(c *fiber.Ctx) error
- func GetPublicCoverPicById(c *fiber.Ctx) error
- func GetPublicProfilePicById(c *fiber.Ctx) error
- func GetUserFromToken(token string) (models.User, error)
- func IsValidRole(role string) bool
- func Login(c *fiber.Ctx) error
- func Register(c *fiber.Ctx) error
- func UpdateProfileDetails(c *fiber.Ctx) error
- type CustomClaims
Constants ¶
This section is empty.
Variables ¶
View Source
var Roles []string = []string{"SUPERUSER", "ADMIN", "EDITOR"}
Functions ¶
func AddUploadCoverPic ¶
func AddUploadCoverPic(c *fiber.Ctx) error
func AddUploadProfilePic ¶
func AddUploadProfilePic(c *fiber.Ctx) error
func DeleteCoverPic ¶
func DeleteCoverPic(c *fiber.Ctx) error
func DeleteProfilePic ¶
func DeleteProfilePic(c *fiber.Ctx) error
func GenerateJWT ¶
func GetCoverPic ¶
func GetCoverPic(c *fiber.Ctx) error
func GetProfile ¶
func GetProfile(c *fiber.Ctx) error
func GetProfilePic ¶
func GetProfilePic(c *fiber.Ctx) error
func GetPublicCoverPicById ¶
func GetPublicCoverPicById(c *fiber.Ctx) error
func GetPublicProfilePicById ¶
func GetPublicProfilePicById(c *fiber.Ctx) error
func IsValidRole ¶
func UpdateProfileDetails ¶
func UpdateProfileDetails(c *fiber.Ctx) error
Types ¶
type CustomClaims ¶
type CustomClaims struct { UserId string `json:"user_id"` FindName string `json:"Find_name"` LastName string `json:"last_name"` Gender string `json:"gender"` // BirthDate string `json:"birth_date"` UserName string `json:"user_name"` // MobileNo string `json:"mobile_no"` // EmailID string `json:"email_id"` ProfileImage *models.ProfileImage `json:"profile_image"` CoverImage *models.CoverImage `json:"cover_image"` jwt.RegisteredClaims }
func VerifyJWT ¶
func VerifyJWT(tokenString string) (*CustomClaims, error)
Click to show internal directories.
Click to hide internal directories.