util

package
v0.0.0-...-600b1a9 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *slog.Logger
View Source
var (
	SupportedVideoExtensions = []string{"mp4", "mov"}
)

Functions

func CheckPassword

func CheckPassword(password string, hashedPassword string) error

CheckPassword checks if the provided password is correct or not

func CreateDirectory

func CreateDirectory(path string) error

CreateDirectory creates a directory if it does not exist

func HashPassword

func HashPassword(password string) (string, error)

HashPassword returns the bcrypt hash of the password

func IsFileAlreadyExists

func IsFileAlreadyExists(path string) bool

IsFileAlreadyExists checks if a file exists

func IsSupportedExtensions

func IsSupportedExtensions(ex string) bool

IsSupportedExtensions checks if the extension is supported by walking through SupportedVideoExtensions

func RandomEmail

func RandomEmail() string

RandomEmail generates a random email

func RandomInt

func RandomInt(min, max int64) int64

RandomInt generates a random integer between min and max

func RandomString

func RandomString(n int) string

RandomString generates a random string of length n

Types

This section is empty.

Jump to

Keyboard shortcuts

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