email

package
v0.0.0-...-6ba5f52 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package email is a generated GoMock package.

Index

Constants

View Source
const AddedAsCollaboratorTemplateName string = "added_as_collaborator"

AddedAsCollaboratorTemplateName is the template name definition for the corresponding email template

View Source
const AggregatedDailyDigestTemplateName string = "aggregated_daily_digest"

AggregatedDailyDigestTemplateName is the template name definition for the corresponding email template

View Source
const DailyDigestTemplateName string = "daily_digest"

DailyDigestTemplateName is the template name definition for the corresponding email template

View Source
const DataExchangeApproachMarkedCompleteTemplateName string = "data_exchange_approach_marked_complete"

DataExchangeApproachMarkedCompleteTemplateName is the template name for the data exchange approach completed email

View Source
const DiscussionReplyCreatedOriginatorTemplateName string = "discussion_reply_created_originator"

DiscussionReplyCreatedOriginatorTemplateName is the template name definition for the corresponding email template

View Source
const MTOCommonSolutionContractorAddedTemplateName = "mto_common_solution_contractor_added"

MTOCommonSolutionContractorAddedTemplateName is the template name for the contractor added email

View Source
const MTOCommonSolutionContractorEditedTemplateName = "mto_common_solution_contractor_edited"

MTOCommonSolutionContractorEditedTemplateName is the template name for the contractor edited email

View Source
const MTOCommonSolutionContractorRemovedTemplateName = "mto_common_solution_contractor_removed"

MTOCommonSolutionContractorEditedTemplateName is the template name for the contractor edited email

View Source
const MTOCommonSolutionPOCAddedTemplateName = "mto_common_solution_poc_added"

MTOCommonSolutionPOCAddedTemplateName is the template name for the POC added email

View Source
const MTOCommonSolutionPOCEditedTemplateName = "mto_common_solution_poc_edited"

MTOCommonSolutionPOCEditedTemplateName is the template name for the POC edited email

View Source
const MTOCommonSolutionPOCRemovedTemplateName = "mto_common_solution_poc_removed"

MTOCommonSolutionPOCRemovedTemplateName is the template name for the POC removed email

View Source
const MTOCommonSolutionPOCWelcomeTemplateName = "mto_common_solution_poc_welcome"

MTOCommonSolutionPOCWelcomeTemplateName is the template name for the POC welcome email

View Source
const MTOSolutionSelectedTemplateName string = "mto_solution_selected"

MTOSolutionSelectedTemplateName is the template name for the solution selected email that is sent to an MTO solution POCS

View Source
const ModelPlanCreatedTemplateName string = "model_plan_created"

ModelPlanCreatedTemplateName is the template name definition for the corresponding email template

View Source
const ModelPlanDateChangedTemplateName string = "model_plan_date_changed"

ModelPlanDateChangedTemplateName is the template name definition for the corresponding email template

View Source
const ModelPlanShareTemplateName string = "model_plan_share"

ModelPlanShareTemplateName is the template name definition for the corresponding email template

View Source
const ModelPlanSuggestedPhaseTemplateName string = "model_plan_suggested_phase"

ModelPlanSuggestedPhaseTemplateName is the template name for the model plan suggested phase email

View Source
const OperationalSolutionSelectedTemplateName string = "operational_solution_selected"

OperationalSolutionSelectedTemplateName is the template name for the solution selected email that is sent to solution POCS

View Source
const PlanDiscussionCreatedTemplateName string = "plan_discussion_created"

PlanDiscussionCreatedTemplateName is the template name definition for the corresponding email template

View Source
const PlanDiscussionTaggedMTOCommonSolutionTemplateName string = "plan_discussion_tagged_solution"

PlanDiscussionTaggedMTOCommonSolutionTemplateName is the template name definition for the corresponding email template

View Source
const PlanDiscussionTaggedUserTemplateName string = "plan_discussion_tagged_user"

PlanDiscussionTaggedUserTemplateName is the template name definition for the corresponding email template

View Source
const ReportAProblemTemplateName string = "report_a_problem"

ReportAProblemTemplateName is the template name definition for the corresponding email template

View Source
const SendFeedbackTemplateName string = "send_feedback"

SendFeedbackTemplateName is the template name definition of the send feedback email template

View Source
const SystemOwnerAddedTemplateName string = "mto_common_solution_system_owner_added"

SystemOwnerAddedTemplateName is the template name for the system owner added email

View Source
const SystemOwnerEditedTemplateName string = "mto_common_solution_system_owner_edited"

SystemOwnerEditedTemplateName is the template name for the system owner edited email

View Source
const SystemOwnerRemovedTemplateName string = "mto_common_solution_system_owner_removed"

SystemOwnerRemovedTemplateName is the template name for the system owner removed email

Variables

View Source
var MTOCommonSolutionContractorAddedBodyTemplate string
View Source
var MTOCommonSolutionContractorAddedSubjectTemplate string
View Source
var MTOCommonSolutionContractorEditedBodyTemplate string
View Source
var MTOCommonSolutionContractorEditedSubjectTemplate string
View Source
var MTOCommonSolutionContractorRemovedBodyTemplate string
View Source
var MTOCommonSolutionContractorRemovedSubjectTemplate string
View Source
var MTOCommonSolutionPOCAddedBodyTemplate string
View Source
var MTOCommonSolutionPOCAddedSubjectTemplate string
View Source
var MTOCommonSolutionPOCEditedBodyTemplate string
View Source
var MTOCommonSolutionPOCEditedSubjectTemplate string
View Source
var MTOCommonSolutionPOCRemovedBodyTemplate string
View Source
var MTOCommonSolutionPOCRemovedSubjectTemplate string
View Source
var MTOCommonSolutionPOCWelcomeBodyTemplate string
View Source
var MTOCommonSolutionPOCWelcomeSubjectTemplate string

Functions

func ToTitleCase

func ToTitleCase(input string) string

Types

type AddedAsCollaboratorBodyContent

type AddedAsCollaboratorBodyContent struct {
	ClientAddress string
	ModelName     string
	ModelID       string
}

AddedAsCollaboratorBodyContent defines the parameters necessary for the corresponding email body

type AddedAsCollaboratorSubjectContent

type AddedAsCollaboratorSubjectContent struct {
	ModelName string
}

AddedAsCollaboratorSubjectContent defines the parameters necessary for the corresponding email subject

type AddedAsPointOfContactBodyContent

type AddedAsPointOfContactBodyContent struct {
	ClientAddress         string
	Key                   string
	SolutionAcronym       string
	SolutionName          string
	IsPrimary             string // "Yes" or "No"
	ReceivesNotifications string // "Yes" or "No"
}

AddedAsPointOfContactBodyContent defines the parameters necessary for the email body.

func NewAddedAsPointOfContactBodyContent

func NewAddedAsPointOfContactBodyContent(
	clientAddress string,
	contact models.MTOCommonSolutionContact,
	solutionName string,
) AddedAsPointOfContactBodyContent

NewAddedAsPointOfContactBodyContent constructs the email body content when a user is added as a point of contact.

type AddedAsPointOfContactSubjectContent

type AddedAsPointOfContactSubjectContent struct {
	SolutionAcronym string
	SolutionName    string
}

AddedAsPointOfContactSubjectContent defines the parameters necessary for the email subject.

type AddressBook

type AddressBook struct {
	// DefaultSender is the default sender for all emails
	DefaultSender string

	// MINTTeamEmail is the email address of the MINT team
	MINTTeamEmail string

	// DevTeamEmail is the email address of the MINT development team
	DevTeamEmail string

	// ModelPlanDateChangedRecipients is the list of email addresses that should
	// receive notifications when one or more model plan dates are changed
	ModelPlanDateChangedRecipients []string
}

AddressBook is a struct that contains all the standard email addresses used by MINT

type AggregatedDailyDigestBodyContent

type AggregatedDailyDigestBodyContent struct {
	AnalyzedAudits []*models.AnalyzedAudit
	ClientAddress  string
}

AggregatedDailyDigestBodyContent defines the parameters necessary for the corresponding email body

type AggregatedDailyDigestSubjectContent

type AggregatedDailyDigestSubjectContent struct{}

AggregatedDailyDigestSubjectContent defines the parameters necessary for the corresponding email subject

type ContractorAddedBodyContent

type ContractorAddedBodyContent struct {
	ClientAddress  string
	Key            string
	SolutionName   string
	ContractorName string
	ContractTitle  string
}

ContractorAddedBodyContent defines the parameters necessary for the email body.

func NewContractorAddedBodyContent

func NewContractorAddedBodyContent(
	clientAddress string,
	contractor models.MTOCommonSolutionContractor,
	solutionName string,
) ContractorAddedBodyContent

NewContractorAddedBodyContent constructs the email body content when a contractor is added.

type ContractorAddedSubjectContent

type ContractorAddedSubjectContent struct {
	SolutionName string
}

ContractorAddedSubjectContent defines the parameters necessary for the email subject.

type ContractorEditedBodyContent

type ContractorEditedBodyContent struct {
	ClientAddress  string
	Key            string
	SolutionName   string
	ContractorName string
	ContractTitle  string
}

ContractorEditedBodyContent defines the parameters necessary for the email body.

func NewContractorEditedBodyContent

func NewContractorEditedBodyContent(
	clientAddress string,
	contractor models.MTOCommonSolutionContractor,
	solutionName string,
) ContractorEditedBodyContent

NewContractorEditedBodyContent constructs the email body content when a contractor is edited.

type ContractorEditedSubjectContent

type ContractorEditedSubjectContent struct {
	SolutionName string
}

ContractorEditedSubjectContent defines the parameters necessary for the email subject.

type ContractorRemovedBodyContent

type ContractorRemovedBodyContent struct {
	ClientAddress  string
	Key            string
	SolutionName   string
	ContractorName string
	ContractTitle  string
}

ContractorRemovedBodyContent defines the parameters necessary for the email body.

func NewContractorRemovedBodyContent

func NewContractorRemovedBodyContent(
	clientAddress string,
	contractor models.MTOCommonSolutionContractor,
	solutionName string,
) ContractorRemovedBodyContent

NewContractorRemovedBodyContent constructs the email body content when a contractor is removed.

type ContractorRemovedSubjectContent

type ContractorRemovedSubjectContent struct {
	SolutionName string
}

ContractorAddedSubjectContent defines the parameters necessary for the email subject.

type DailyDigestBodyContent

type DailyDigestBodyContent struct {
	AnalyzedAudits []*models.AnalyzedAudit
	ClientAddress  string
}

DailyDigestBodyContent defines the parameters necessary for the corresponding email body

type DailyDigestSubjectContent

type DailyDigestSubjectContent struct{}

DailyDigestSubjectContent defines the parameters necessary for the corresponding email subject

type DataExchangeApproachMarkedCompleteBodyContent

type DataExchangeApproachMarkedCompleteBodyContent struct {
	ClientAddress                   string
	ModelName                       string
	ModelID                         string
	MarkedCompletedByUserCommonName string
	ShowFooter                      bool
}

DataExchangeApproachMarkedCompleteBodyContent defines the parameters necessary for the corresponding email body

type DataExchangeApproachMarkedCompleteSubjectContent

type DataExchangeApproachMarkedCompleteSubjectContent struct {
	ModelName string
}

DataExchangeApproachMarkedCompleteSubjectContent defines the parameters necessary for the corresponding email subject

type DateChange

type DateChange struct {
	IsChanged                                              bool
	Field                                                  string
	IsRange                                                bool
	OldDate, NewDate                                       *time.Time
	OldRangeStart, OldRangeEnd, NewRangeStart, NewRangeEnd *time.Time
}

DateChange defines the parameters necessary for parsing date changes, both singular and ranges If the OldRange and NewRange are both nil, then the change is singular

type DiscussionReplyCreatedOriginatorBody

type DiscussionReplyCreatedOriginatorBody struct {
	ClientAddress     string
	DiscussionID      string
	DiscussionContent template.HTML // rich text with tagging etc
	ModelID           string
	ModelName         string
	ModelAbbreviation string
	OriginatorName    string
	OriginatorRole    string
	ReplyCount        int
	Replies           []DiscussionReplyEmailContent // two most recent  replies with all relevant reply information
}

DiscussionReplyCreatedOriginatorBody is the fields needed for reply body

type DiscussionReplyCreatedOriginatorSubject

type DiscussionReplyCreatedOriginatorSubject struct {
	ModelName         string
	ModelAbbreviation string
}

DiscussionReplyCreatedOriginatorSubject is the subject for hte email

type DiscussionReplyEmailContent

type DiscussionReplyEmailContent struct {
	UserName string // the full name of the user replying to email
	ID       uuid.UUID
	Role     string
	Content  template.HTML // rich text with tagging etc
}

DiscussionReplyEmailContent represents the replies for a discussion These will be sorted from newest to oldest.

func DiscussionRepliesEmailContentDBToEmailForm

func DiscussionRepliesEmailContentDBToEmailForm(drebs []*DiscussionReplyEmailContentDB) []DiscussionReplyEmailContent

DiscussionRepliesEmailContentDBToEmailForm converts an array of db contents to the form needed for email

type DiscussionReplyEmailContentDB

type DiscussionReplyEmailContentDB struct {
	CommonName          string                     `json:"commonName" db:"common_name"` // Name of user who created the reply
	Email               string                     `json:"email" db:"email"`            // Email of user who created reply
	ID                  uuid.UUID                  `json:"id" db:"id"`
	DiscussionID        uuid.UUID                  `json:"discussionID" db:"discussion_id"`
	Role                *models.DiscussionUserRole `json:"userRole" db:"user_role"`
	UserRoleDescription *string                    `json:"userRoleDescription" db:"user_role_description"`
	Content             models.TaggedHTML          `json:"content" db:"content"`
	IsAssessment        bool                       `json:"isAssessment" db:"is_assessment"`
	CreatedDts          time.Time                  `json:"createdDts" db:"created_dts"`
}

DiscussionReplyEmailContentDB represents the replies for a discussion and are returned direvtly from teh database with extended properties

func (*DiscussionReplyEmailContentDB) ToDiscussionReplyEmailContent

func (dreb *DiscussionReplyEmailContentDB) ToDiscussionReplyEmailContent() DiscussionReplyEmailContent

ToDiscussionReplyEmailContent converts DiscussionReplyEmailContentDB to the form needed for the email

type MTOSolutionSelectedBodyContent

type MTOSolutionSelectedBodyContent struct {
	ClientAddress     string
	FilterView        string
	SolutionName      string // TODO do we need to get the short name for solution? Is this avaialble in the DB? We have the key, but I'm not sure that it actually maps
	SolutionStatus    string
	ModelLeadNames    string
	MilestoneNames    *string
	ModelID           string
	ModelName         string
	ModelAbbreviation string
	ModelStatus       string
	ModelStartDate    *time.Time
}

MTOSolutionSelectedBodyContent defines the parameters necessary for the corresponding email body

type MTOSolutionSelectedDB

type MTOSolutionSelectedDB struct {
	FilterView        *models.ModelViewFilter      `json:"filterView" db:"filter_view"`
	SolutionName      string                       `json:"solName" db:"sol_name"` //From possible MTO solution
	SolutionStatus    models.MTOSolutionStatus     `json:"solStatus" db:"sol_status"`
	SolutionKey       models.MTOCommonMilestoneKey `json:"solKey" db:"sol_key"`
	ModelLeadNames    string                       `json:"modelLeadNames" db:"model_lead_names"` // This comes from plan collaborators and user account table
	MilestoneNames    *string                      `json:"milestoneNames" db:"milestone_names"`  // you can potentially return an array if better
	ModelID           uuid.UUID                    `json:"modelID" db:"model_id"`
	ModelName         string                       `json:"modelName" db:"model_name"`
	ModelAbbreviation *string                      `json:"modelAbbreviation" db:"model_abbreviation"`
	ModelStatus       models.ModelStatus           `json:"modelStatus" db:"model_status"`
	ModelStartDate    *time.Time                   `json:"modelStartDate" db:"model_start_date"` // from plan basics performance_period_starts
}

MTOSolutionSelectedDB this represents the data retrieved from the database for when a solution is selected from the database

func (*MTOSolutionSelectedDB) ToSolutionSelectedBodyContent

func (ssdb *MTOSolutionSelectedDB) ToSolutionSelectedBodyContent(clientAddress string) MTOSolutionSelectedBodyContent

ToSolutionSelectedBodyContent converts a SolutionSelectedDB struct to SolutionSelctedBodyContent

type MTOSolutionSelectedSubjectContent

type MTOSolutionSelectedSubjectContent struct {
	ModelName    string
	SolutionName string
}

MTOSolutionSelectedSubjectContent defines the parameters necessary for the corresponding email subject

type MockTemplateService

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

MockTemplateService is a mock of TemplateService interface.

func NewMockTemplateService

func NewMockTemplateService(ctrl *gomock.Controller) *MockTemplateService

NewMockTemplateService creates a new mock instance.

func (*MockTemplateService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTemplateService) GetEmailTemplate

func (m *MockTemplateService) GetEmailTemplate(emailTemplateName string) (*emailtemplates.EmailTemplate, error)

GetEmailTemplate mocks base method.

func (*MockTemplateService) Load

func (m *MockTemplateService) Load() error

Load mocks base method.

type MockTemplateServiceMockRecorder

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

MockTemplateServiceMockRecorder is the mock recorder for MockTemplateService.

func (*MockTemplateServiceMockRecorder) GetEmailTemplate

func (mr *MockTemplateServiceMockRecorder) GetEmailTemplate(emailTemplateName interface{}) *gomock.Call

GetEmailTemplate indicates an expected call of GetEmailTemplate.

func (*MockTemplateServiceMockRecorder) Load

Load indicates an expected call of Load.

type ModelPlanCreatedBodyContent

type ModelPlanCreatedBodyContent struct {
	ClientAddress string
	ModelName     string
	ModelID       string
	UserName      string
	IsGeneralUser bool
}

ModelPlanCreatedBodyContent defines the parameters necessary for the corresponding email body

type ModelPlanCreatedSubjectContent

type ModelPlanCreatedSubjectContent struct {
	ModelName string
}

ModelPlanCreatedSubjectContent defines the parameters necessary for the corresponding email subject

type ModelPlanDateChangedBodyContent

type ModelPlanDateChangedBodyContent struct {
	ClientAddress string
	ModelName     string
	ModelID       string
	DateChanges   []DateChange
	ShowFooter    bool
}

ModelPlanDateChangedBodyContent defines the parameters necessary for the corresponding email body

type ModelPlanDateChangedSubjectContent

type ModelPlanDateChangedSubjectContent struct {
	ModelName string
}

ModelPlanDateChangedSubjectContent defines the parameters necessary for the corresponding email subject

type ModelPlanShareBodyContent

type ModelPlanShareBodyContent struct {
	UserName                   string
	OptionalMessage            *string
	ModelName                  string
	ModelShortName             *string
	ModelCategories            []string
	ModelStatus                string
	ModelLastUpdated           time.Time
	ModelLeads                 []string
	ModelViewFilter            *string
	ModelShareSectionHumanized *string
	ModelShareSectionRoute     *string
	HumanizedModelViewFilter   *string
	ClientAddress              string
	ModelID                    string
}

ModelPlanShareBodyContent defines the parameters necessary for the corresponding email body

type ModelPlanShareSubjectContent

type ModelPlanShareSubjectContent struct {
	UserName string
}

ModelPlanShareSubjectContent defines the parameters necessary for the corresponding email subject

type ModelPlanSuggestedPhaseBodyContent

type ModelPlanSuggestedPhaseBodyContent struct {
	ClientAddress              string
	Phase                      string
	SuggestedStatusesRaw       []string
	SuggestedStatusesHumanized []string
	CurrentStatusHumanized     string
	ModelPlanID                string
	ModelPlanName              string
}

type ModelPlanSuggestedPhaseSubjectContent

type ModelPlanSuggestedPhaseSubjectContent struct {
	ModelName string
}

type OperationalSolutionSelectedBodyContent

type OperationalSolutionSelectedBodyContent struct {
	ClientAddress     string
	FilterView        string
	SolutionName      string
	SolutionStatus    string
	ModelLeadNames    string
	NeedName          string
	ModelID           string
	ModelName         string
	ModelAbbreviation string
	ModelStatus       string
	ModelStartDate    *time.Time
}

OperationalSolutionSelectedBodyContent defines the parameters necessary for the corresponding email body

type OperationalSolutionSelectedDB

type OperationalSolutionSelectedDB struct {
	FilterView        *models.ModelViewFilter `json:"filterView" db:"filter_view"`
	SolutionName      string                  `json:"solName" db:"sol_name"` //From possible operational solution
	SolutionStatus    models.OpSolutionStatus `json:"solStatus" db:"sol_status"`
	ModelLeadNames    string                  `json:"modelLeadNames" db:"model_lead_names"` // This comes from plan collaborators and user account table
	NeedName          string                  `json:"needName" db:"need_name"`
	ModelID           uuid.UUID               `json:"modelID" db:"model_id"`
	ModelName         string                  `json:"modelName" db:"model_name"`
	ModelAbbreviation *string                 `json:"modelAbbreviation" db:"model_abbreviation"`
	ModelStatus       models.ModelStatus      `json:"modelStatus" db:"model_status"`
	ModelStartDate    *time.Time              `json:"modelStartDate" db:"model_start_date"` // from plan basics performance_period_starts
}

OperationalSolutionSelectedDB this represents the data retrieved from the database for when a solution is selected from the database

func (*OperationalSolutionSelectedDB) ToSolutionSelectedBodyContent

func (ssdb *OperationalSolutionSelectedDB) ToSolutionSelectedBodyContent(clientAddress string) OperationalSolutionSelectedBodyContent

ToSolutionSelectedBodyContent converts a SolutionSelectedDB struct to SolutionSelctedBodyContent

type OperationalSolutionSelectedSubjectContent

type OperationalSolutionSelectedSubjectContent struct {
	ModelName    string
	SolutionName string
}

OperationalSolutionSelectedSubjectContent defines the parameters necessary for the corresponding email subject

type PlanDiscussionCreatedBodyContent

type PlanDiscussionCreatedBodyContent struct {
	ClientAddress     string
	DiscussionID      string
	UserName          string
	DiscussionContent template.HTML // the rich text content of the discussion. It is written as template.HTML to allow it be rendered as HTML with the templating library
	ModelID           string
	ModelName         string
	Role              string
}

PlanDiscussionCreatedBodyContent defines the parameters necessary for the corresponding email body

func NewPlanDiscussionCreatedBodyContent

func NewPlanDiscussionCreatedBodyContent(
	clientAddress string,
	planDiscussion *models.PlanDiscussion,
	modelPlan *models.ModelPlan,
	userName string,
	role string,
) *PlanDiscussionCreatedBodyContent

constructor for PlanDiscussionCreatedBodyContent

type PlanDiscussionCreatedSubjectContent

type PlanDiscussionCreatedSubjectContent struct {
	ModelName         string
	ModelAbbreviation string
	UserName          string
}

PlanDiscussionCreatedSubjectContent defines the parameters necessary for the corresponding email subject

type PlanDiscussionTaggedSolutionBodyContent

type PlanDiscussionTaggedSolutionBodyContent struct {
	ClientAddress     string
	DiscussionID      string
	UserName          string
	DiscussionContent template.HTML // the rich text content of the discussion / reply. It is written as template.HTML to allow it be rendered as HTML with the templating library
	ModelID           string
	ModelName         string
	ModelAbbreviation string
	Role              string
	SolutionName      string
}

PlanDiscussionTaggedSolutionBodyContent defines the parameters necessary for the corresponding email body

type PlanDiscussionTaggedSolutionSubjectContent

type PlanDiscussionTaggedSolutionSubjectContent struct {
	SolutionName      string
	ModelName         string
	ModelAbbreviation string
}

PlanDiscussionTaggedSolutionSubjectContent defines the parameters necessary for the corresponding email subject

type PlanDiscussionTaggedUserBodyContent

type PlanDiscussionTaggedUserBodyContent struct {
	ClientAddress     string
	DiscussionID      string
	UserName          string
	DiscussionContent template.HTML // the rich text content of the discussion. It is written as template.HTML to allow it be rendered as HTML with the templating library
	ModelID           string
	ModelName         string
	ModelAbbreviation string
	Role              string
}

PlanDiscussionTaggedUserBodyContent defines the parameters necessary for the corresponding email body

type PlanDiscussionTaggedUserSubjectContent

type PlanDiscussionTaggedUserSubjectContent struct {
	ModelName         string
	ModelAbbreviation string
}

PlanDiscussionTaggedUserSubjectContent defines the parameters necessary for the corresponding email subject

type PointOfContactAddedBodyContent

type PointOfContactAddedBodyContent struct {
	SolutionAcronym          string
	SolutionName             string
	ContactName              string
	ContactEmail             string
	ContactRole              string
	IsPrimary                string // "Yes" or "No"
	WillReceiveNotifications string // "Yes" or "No"
	ClientAddress            string
	Key                      string
}

PointOfContactAddedBodyContent defines the parameters necessary for the email body.

func NewPointOfContactAddedBodyContent

func NewPointOfContactAddedBodyContent(
	clientAddress string,
	contact models.MTOCommonSolutionContact,
	solutionName string,
) PointOfContactAddedBodyContent

NewPointOfContactAddedBodyContent constructs an email body content struct from an MTOCommonSolutionContact.

type PointOfContactAddedSubjectContent

type PointOfContactAddedSubjectContent struct {
	SolutionAcronym string
	SolutionName    string
}

PointOfContactAddedSubjectContent defines the parameters necessary for the email subject.

type PointOfContactRemovedBodyContent

type PointOfContactRemovedBodyContent struct {
	ClientAddress      string
	Key                string
	SolutionAcronym    string
	SolutionName       string
	RemovedContactType string
	RemovedContactName string
}

PointOfContactRemovedBodyContent defines the parameters necessary for the email body.

func NewPointOfContactRemovedBodyContent

func NewPointOfContactRemovedBodyContent(
	clientAddress string,
	contact models.MTOCommonSolutionContact,
	solutionName string,
) PointOfContactRemovedBodyContent

NewPointOfContactRemovedBodyContent constructs the email body content for a point of contact removal.

type PointOfContactRemovedSubjectContent

type PointOfContactRemovedSubjectContent struct {
	SolutionAcronym string
	SolutionName    string
}

PointOfContactRemovedSubjectContent defines the parameters necessary for the email subject.

type PointOfContactUpdatedBodyContent

type PointOfContactUpdatedBodyContent struct {
	ClientAddress         string
	Key                   string
	SolutionAcronym       string
	SolutionName          string
	ContactName           string
	ContactEmail          string
	ContactRole           string
	IsPrimary             string // "Yes" or "No"
	ReceivesNotifications string // "Yes" or "No"
}

PointOfContactUpdatedBodyContent defines the parameters necessary for the email body.

func NewPointOfContactUpdatedBodyContent

func NewPointOfContactUpdatedBodyContent(
	clientAddress string,
	contact models.MTOCommonSolutionContact,
	solutionName string,
) PointOfContactUpdatedBodyContent

NewPointOfContactUpdatedBodyContent constructs the email body content for a point of contact update.

type PointOfContactUpdatedSubjectContent

type PointOfContactUpdatedSubjectContent struct {
	SolutionAcronym string
	SolutionName    string
}

PointOfContactUpdatedSubjectContent defines the parameters necessary for the email subject.

type ReportAProblemBodyContent

type ReportAProblemBodyContent struct {
	ClientAddress         string
	IsAnonymousSubmission bool
	ReporterName          string
	ReporterEmail         string
	AllowContact          string
	Section               string
	WhatDoing             string
	WhatWentWrong         string
	Severity              string
}

ReportAProblemBodyContent defines the parameters necessary for the corresponding email body

type ReportAProblemSubjectContent

type ReportAProblemSubjectContent struct{}

ReportAProblemSubjectContent defines the parameters necessary for the corresponding email subject

type SendFeedbackBodyContent

type SendFeedbackBodyContent struct {
	ClientAddress         string
	IsAnonymousSubmission bool
	ReporterName          string
	ReporterEmail         string
	AllowContact          string
	CMSRole               string
	MINTUsedFor           []string
	SystemEasyToUse       string
	HowSatisfied          string
	HowCanWeImprove       string
}

SendFeedbackBodyContent defines the parameters necessary for the corresponding email body

type SendFeedbackSubjectContent

type SendFeedbackSubjectContent struct{}

SendFeedbackSubjectContent defines the parameters necessary for the corresponding email subject

type SystemOwnerAddedBodyContent

type SystemOwnerAddedBodyContent struct {
	SolutionAcronym string
	SolutionName    string
	CmsComponent    string
	OwnerType       string
	ClientAddress   string
	Key             string
}

SystemOwnerAddedBodyContent defines the parameters necessary for the email body.

func NewSystemOwnerAddedBodyContent

func NewSystemOwnerAddedBodyContent(
	clientAddress string,
	systemOwner models.MTOCommonSolutionSystemOwner,
	solutionName string,
) SystemOwnerAddedBodyContent

NewSystemOwnerAddedBodyContent constructs an email body content struct from an MTOCommonSolutionSystemOwner.

type SystemOwnerAddedSubjectContent

type SystemOwnerAddedSubjectContent struct {
	SolutionAcronym string
	SolutionName    string
}

SystemOwnerAddedSubjectContent defines the parameters necessary for the email subject.

type SystemOwnerEditedBodyContent

type SystemOwnerEditedBodyContent struct {
	SolutionAcronym string
	SolutionName    string
	CmsComponents   []string
	ClientAddress   string
	Key             string
}

SystemOwnerEditedBodyContent defines the parameters necessary for the email body.

func NewSystemOwnerEditedBodyContent

func NewSystemOwnerEditedBodyContent(
	clientAddress string,
	systemOwner models.MTOCommonSolutionSystemOwner,
	solutionName string,
	cmsComponents []models.MTOCommonSolutionCMSComponent,
) SystemOwnerEditedBodyContent

NewSystemOwnerEditedBodyContent constructs an email body content struct from an MTOCommonSolutionSystemOwner.

type SystemOwnerEditedSubjectContent

type SystemOwnerEditedSubjectContent struct {
	SolutionAcronym string
	SolutionName    string
}

SystemOwnerEditedSubjectContent defines the parameters necessary for the email subject.

type SystemOwnerRemovedBodyContent

type SystemOwnerRemovedBodyContent struct {
	SolutionAcronym string
	SolutionName    string
	CmsComponent    string
	OwnerType       string
	ClientAddress   string
	Key             string
}

SystemOwnerRemovedBodyContent defines the parameters necessary for the email body.

func NewSystemOwnerRemovedBodyContent

func NewSystemOwnerRemovedBodyContent(
	clientAddress string,
	systemOwner models.MTOCommonSolutionSystemOwner,
	solutionName string,
) SystemOwnerRemovedBodyContent

NewSystemOwnerRemovedBodyContent constructs an email body content struct from an MTOCommonSolutionSystemOwner.

type SystemOwnerRemovedSubjectContent

type SystemOwnerRemovedSubjectContent struct {
	SolutionAcronym string
	SolutionName    string
}

SystemOwnerRemovedSubjectContent defines the parameters necessary for the email subject.

type TemplateService

type TemplateService interface {
	Load() error
	GetEmailTemplate(emailTemplateName string) (*emailtemplates.EmailTemplate, error)
}

TemplateService is the interface layer for template services

type TemplateServiceImpl

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

TemplateServiceImpl is an implementation-specific structure loading all resources necessary for server execution

func NewTemplateServiceImpl

func NewTemplateServiceImpl() (*TemplateServiceImpl, error)

NewTemplateServiceImpl is a constructor for TemplateServiceImpl

func (*TemplateServiceImpl) GetEmailTemplate

func (t *TemplateServiceImpl) GetEmailTemplate(emailTemplateName string) (*emailtemplates.EmailTemplate, error)

GetEmailTemplate fetches an emailtemplates.EmailTemplate by name from the emailtemplates.TemplateCache

func (*TemplateServiceImpl) Load

func (t *TemplateServiceImpl) Load() error

Load caches all email templates which will be used by the template service

Jump to

Keyboard shortcuts

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