service

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFileConfPath

func GetFileConfPath(baseDir, fileName string, h *handler.Handler) (string, error)

GetFileConfPath get file configuration path

func NewCasbinEnforcer

func NewCasbinEnforcer(h *handler.Handler, modelPath string) (*casbin.Enforcer, error)

NewCasbinEnforcer new casbin enforcer

Types

type EmailFormat added in v0.2.0

type EmailFormat string
const (
	HTMLEmail EmailFormat = "HTML"
	TEXTEmail EmailFormat = "TEXT"
)

type SMTPSender

type SMTPSender struct {
	// contains filtered or unexported fields
}

SMTPSender type

func NewSMTPSender

func NewSMTPSender(h *handler.Handler) (*SMTPSender, error)

NewSMTPSender new SMTPSender

func (*SMTPSender) SendEmail

func (s *SMTPSender) SendEmail(toEmail string, subject string, body string) error

SendEmail send email using SMTP

func (*SMTPSender) SendEmails added in v0.2.0

func (s *SMTPSender) SendEmails(toEmails []string, hFromEmail string, hToEmail string, hCcEmail string, hBccEmail string, subject string, body string, format EmailFormat) error

SendEmails send emails with specific format/type

Jump to

Keyboard shortcuts

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