tools

package
v0.0.0-...-b7696d2 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivationEmail

func ActivationEmail(activationLink string) string

func CacheGet

func CacheGet(ctx context.Context, key string) (string, error)

func CacheSet

func CacheSet(ctx context.Context, key string, value interface{}, expiration time.Duration) error

func GenerateToken

func GenerateToken(email string, uuid string, function string, expFast bool) (string, error)

func GenerateUUID

func GenerateUUID() string

func GetIPDeviceNameLocation

func GetIPDeviceNameLocation(c *gin.Context) (string, string, string, error)

func GetIPLocation

func GetIPLocation(ipAddress string) (string, error)

func HashingPassword

func HashingPassword(password string) (string, error)

func NormalRequestVerifyToken

func NormalRequestVerifyToken(c *gin.Context) (string, string, error)

func PaymentSuccessEmail

func PaymentSuccessEmail(paymentUUID string, amount int64, currency string) string

func SendActivationEmail

func SendActivationEmail(to string, token string) bool

func StringToJSON

func StringToJSON(s string) interface{}

func ValidateEmail

func ValidateEmail(email string) bool

func VerifyToken

func VerifyToken(tokenString string) (jwt.MapClaims, error)

func VerifyUserPassword

func VerifyUserPassword(password, hash string) bool

Types

type IPLocationResponse

type IPLocationResponse struct {
	CountryName string `json:"country_name"`
}

Jump to

Keyboard shortcuts

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