helper

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertWeightUnit

func ConvertWeightUnit(unit string) string

func EnvInit

func EnvInit() error

func FinItemIDByItemName

func FinItemIDByItemName(inventories dataset.Inventories, itemname string) uint

func FinPackIDByPackName

func FinPackIDByPackName(packs dataset.Packs, packname string) uint

func FinUserIDByUsername

func FinUserIDByUsername(users []dataset.User, username string) uint

func GenerateRandomCode added in v0.3.0

func GenerateRandomCode(length int) (string, error)

func StringToUint

func StringToUint(s string) (uint, error)

Types

type EmailSender added in v0.3.0

type EmailSender interface {
	SendEmail(to, subject, body string) error
}

EmailSender defines the interface for sending emails.

type SMTPClient added in v0.3.0

type SMTPClient struct {
	Server dataset.MailServer
}

SMTPClient struct implements EmailSender interface.

func (*SMTPClient) SendEmail added in v0.3.0

func (s *SMTPClient) SendEmail(to, subject, body string) error

SendMail sends an email using the SMTP protocol.

Jump to

Keyboard shortcuts

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