utils

package
v0.0.0-...-ef33383 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(encryptedString string) (decryptedString string, err error)

func AESEncrypt

func AESEncrypt(stringToEncrypt string) (encryptedString string, err error)

func GenUniqueCode

func GenUniqueCode() string

generate a length of 4 random character and number with first and third character is a letter and second and fourth character is a number

func GetExtensions

func GetExtensions(filename string) string

func SendMail

func SendMail(mail Email) error

func ValidateEmail

func ValidateEmail(email string) bool
func ValidateLink(link string) bool

Types

type Email

type Email struct {
	Email   string
	Subject string
	Body    string
}

type EmptyObj

type EmptyObj struct{}

type Response

type Response struct {
	Status  bool   `json:"status"`
	Message string `json:"message"`
	Error   any    `json:"error,omitempty"`
	Data    any    `json:"data,omitempty"`
	Meta    any    `json:"meta,omitempty"`
}

func BuildResponseFailed

func BuildResponseFailed(message string, err string, data any) Response

func BuildResponseSuccess

func BuildResponseSuccess(message string, data any) Response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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