service

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2020 License: MIT Imports: 9 Imported by: 2

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

type EmailFormat string

EmailFormat represent EmailFormat

const (
	// HTMLEmail represent HTML Email Format
	HTMLEmail EmailFormat = "HTML"
	// TEXTEmail represent TEXT (Plaintext) Email Format
	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

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