infrastructure

package
v3.14.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: GPL-3.0 Imports: 19 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

type SMTPMock added in v3.13.5

type SMTPMock struct {
	Wg sync.WaitGroup
	// contains filtered or unexported fields
}

func (*SMTPMock) CalledSend added in v3.13.5

func (s *SMTPMock) CalledSend() bool

func (*SMTPMock) From added in v3.13.5

func (s *SMTPMock) From() string

func (*SMTPMock) Send added in v3.13.5

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

func (*SMTPMock) SendDocument added in v3.13.5

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

Jump to

Keyboard shortcuts

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