helper

package
v0.0.0-...-9d4efbb Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash helps to decode hashed password

func CompareMovies

func CompareMovies(db, uploaded *MovieList) MovieList

CompareMovies helps to compare db data and upload file data

func DecodeCookie

func DecodeCookie(req *http.Request, user *User) (*Token, error)

DecodeCookie checks cookie and returns token

func HashPassword

func HashPassword(password string) (string, error)

HashPassword helps to hashing password before save the db

func ReadCSV

func ReadCSV(file *multipart.File) (MovieList, error)

ReadCSV helps to read file and format to list

func SetCookie

func SetCookie(tkn *Token, user *User) *http.Cookie

SetCookie creates cookie depends on token

func VerifyEMail

func VerifyEMail(email string) bool

Verify checks the user e-mail structure

func VerifyPassword

func VerifyPassword(s string) bool

VerifyPassword checks user password that match or not 1 lower, 1 upper, 1 number, 1 special chars and length of password

Types

This section is empty.

Jump to

Keyboard shortcuts

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