infrastructure

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(path string, wordsPerMinute float64) *gorm.DB

func TemplateEngine

func TemplateEngine(viewsFS fs.FS, printers map[string]*message.Printer) (*html.Engine, error)

Types

type NoEmail

type NoEmail struct {
}

func (*NoEmail) From

func (s *NoEmail) From() string

func (*NoEmail) Send

func (s *NoEmail) Send(address, subject, body string) error

func (*NoEmail) SendDocument

func (s *NoEmail) SendDocument(address string, libraryPath string, fileName string) error

type SMTP

type SMTP struct {
	Server   string
	Port     int
	User     string
	Password string
}

func (*SMTP) From

func (s *SMTP) From() string

func (*SMTP) Send

func (s *SMTP) Send(address, subject, body string) error

func (*SMTP) SendDocument

func (s *SMTP) SendDocument(address string, libraryPath string, fileName string) error

SendDocument sends an email with the designated file attached to it to the chosen address

Jump to

Keyboard shortcuts

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