Documentation
¶
Index ¶
- func NewDB(filename string, fileMode os.FileMode, boltOptions *bolt.Options) (db *bolt.DB, err error)
- type Logger
- type Service
- func (s Service) DataDump(ifModifiedSince *time.Time) (dump *dataDump.Dump, err error)
- func (s Service) IsEmailOptedOut(email string) (yes bool, err error)
- func (s Service) OptOutEmail(email string) error
- func (s Service) PeriodicCleanup() (err error)
- func (s Service) RemoveOptedOutEmail(email string) error
- func (s Service) SendEmail(email notification.Email) (id string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶ added in v0.4.1
type Logger interface {
Info(a ...interface{})
Infof(format string, a ...interface{})
Errorf(format string, a ...interface{})
}
Logger defines interface for logging messages with various severity levels.
type Service ¶
type Service struct {
DB *bolt.DB
SMTPHost string
SMTPPort int
SMTPUsername string
SMTPPassword string
SMTPIdentity string
SMTPSkipVerify bool
CleanupPeriod time.Duration
Logger Logger
// contains filtered or unexported fields
}
Service implements gopherpit.com/gopherpit/services/notification.Service interface.
func (Service) DataDump ¶ added in v0.2.1
DataDump implements dataDump.Interface interface to extract database data in a safe and reliable way.
func (Service) IsEmailOptedOut ¶
IsEmailOptedOut returns true or false if e-mail address is marked not to send any e-mail messages to.
func (Service) OptOutEmail ¶
OptOutEmail marks an e-mail address not to send any e-mail messages to.
func (Service) PeriodicCleanup ¶
PeriodicCleanup deletes expired email message IDs on a period defined in Service.CleanupPeriod.
func (Service) RemoveOptedOutEmail ¶
RemoveOptedOutEmail removes an opt-out mark previosulu set by OptOutEmail.
Click to show internal directories.
Click to hide internal directories.