Documentation ¶
Index ¶
- Variables
- func CreateTempFile(image []byte) *os.File
- func GetSecretMessageFromImage(image []byte, passphrase string) string
- func IsChanged(body string, hash string) bool
- func IsSignatureReal(publicKey ed25519.PublicKey, hash []byte, signature []byte) bool
- func LogIn(username string, password string) model.User
- func Mails(user model.User, take string) []model.Mail
- func RandomMails() string
- func SendMail(from model.User, to model.User, body string, keyFromUser string, ...) (bool, model.Mail)
- func Set2faActive(user *model.User) bool
- func Set2faInactive(user *model.User) bool
- func SetMailUser(mail *model.Mail)
- func SingUp(username string, password string) (bool, model.User)
Constants ¶
This section is empty.
Variables ¶
var DB *gorm.DB
DB variable is exported to use on the whole project. Connection is set by using driver/connection.
Functions ¶
func CreateTempFile ¶
CreateTempFile creates temp file by using given byte array.
func GetSecretMessageFromImage ¶
GetSecretMessageFromImage gets secret from image by using DecodeSteganography method.
func IsSignatureReal ¶
IsSignatureReal checks if mail is signed by the right user..
func RandomMails ¶
func RandomMails() string
RandomMails creates random mails that contains 20 words.
func SendMail ¶
func SendMail(from model.User, to model.User, body string, keyFromUser string, secretMessage string, passphrase string, watermark string, imagePath string) (bool, model.Mail)
SendMail sends mails from-user to to-user. It also supports signature.
If mail is sent, method will return true and mail that is sent. If could not sent, method will return false and nil.
func Set2faActive ¶
Set2faInactive methods remove make 2FA option true for the account
func Set2faInactive ¶
Set2faInactive methods remove make 2FA option false for the account
func SetMailUser ¶
Types ¶
This section is empty.