Documentation
¶
Index ¶
- func ConvertWeightUnit(unit string) string
- func FindItemIDByItemName(inventories dataset.Inventories, itemname string) uint
- func FindPackIDByPackName(packs dataset.Packs, packname string) uint
- func FindUserIDByUsername(users []dataset.User, username string) uint
- func GenerateRandomCode(length int) (string, error)
- func IsValidEmail(email string) bool
- func StringToUint(s string) (uint, error)
- type EmailSender
- type SMTPClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertWeightUnit ¶
func FindItemIDByItemName ¶ added in v0.4.0
func FindItemIDByItemName(inventories dataset.Inventories, itemname string) uint
func FindPackIDByPackName ¶ added in v0.4.0
func FindUserIDByUsername ¶ added in v0.4.0
func GenerateRandomCode ¶ added in v0.3.0
func IsValidEmail ¶ added in v0.4.1
func StringToUint ¶
Types ¶
type EmailSender ¶ added in v0.3.0
EmailSender defines the interface for sending emails. Needed for testing without real SMTP server.
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.
Click to show internal directories.
Click to hide internal directories.