utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePassword

func ComparePassword(hashedPass string, password string) error

func DetectFileType

func DetectFileType(file io.Reader) (string, error)

func ExtractTokenFromHeader

func ExtractTokenFromHeader(r *http.Request) (string, error)

func GenerateAccessToken

func GenerateAccessToken(userID uuid.UUID, userType string, profileId uuid.UUID) (string, error)

func GetResumeSummary

func GetResumeSummary(buffer bytes.Buffer) (string, error)

func HashPassword

func HashPassword(password string) ([]byte, error)

func IsTokenExpired

func IsTokenExpired(tokenString string) bool

func PatchProfileFromSummary

func PatchProfileFromSummary(profile *schemas.Profile, summary schemas.Summary)

Types

type Claims

type Claims struct {
	UserID    uuid.UUID `json:"id"`
	UserType  string    `json:"userType"`
	ProfileID uuid.UUID
	jwt.StandardClaims
}

func ParseAccessToken

func ParseAccessToken(tokenString string) (*Claims, error)

Jump to

Keyboard shortcuts

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