utils

package
v0.0.0-...-0d7ea6f Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// todo
	KEY = "8e71bbce7451ba2835de5aea73e4f3f96821455240823d2fd8174975b8321bfc!"
)
View Source
const PATH = "assets"

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 GetExtensions

func GetExtensions(filename string) string

func SendMail

func SendMail(toEmail string, subject string, body string) error

func UploadFile

func UploadFile(file *multipart.FileHeader, path string) error

func ValidateEmail

func ValidateEmail(email string) bool

Types

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

Jump to

Keyboard shortcuts

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