helpers

package
v0.0.0-...-9b9c579 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmailSend

func EmailSend(smtpConfig *models.SmtpConfig, userConfig *models.UserConfig, orgConfig *models.OrganizationConfig,
	regulationType string, actionType string, emailContent string) error

func EmailTestSmtpConfig

func EmailTestSmtpConfig() (*models.SmtpConfig, error)

generate a smtpConfig for https://ethereal.email/ https://github.com/nodemailer/nodemailer/blob/3491486281ea2e2cba9a07d4df14d136f6ebb153/lib/nodemailer.js#L58-L124 Ethereal is a fake SMTP service, mostly aimed at Nodemailer and EmailEngine users (but not limited to). It's a completely free anti-transactional email service where messages never get delivered.

func OrganizationConfig

func OrganizationConfig(organizationId string) (*models.OrganizationConfig, error)

func OrganizationList

func OrganizationList(filter *OrganizationListFilter) ([]string, error)

func TemplatePopulate

func TemplatePopulate(orgId string, regulationType string, actionType string, userData *models.UserConfig, orgConfig *models.OrganizationConfig) (string, error)

TODO: add negative tests when data is invalid or incorrect.

Types

type OrganizationListFilter

type OrganizationListFilter struct {
	OrganizationType string
	RegulationType   string
	OrganizationId   string
}

type TemplateData

type TemplateData struct {
	User interface{}
	Org  *models.OrganizationConfig
	Date string
}

Jump to

Keyboard shortcuts

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