Documentation ¶
Overview ¶
Package email is a generated GoMock package.
Index ¶
- Constants
- type AddedAsCollaboratorBodyContent
- type AddedAsCollaboratorSubjectContent
- type AddressBook
- type AggregatedDailyDigestBodyContent
- type AggregatedDailyDigestSubjectContent
- type DailyDigestBodyContent
- type DailyDigestSubjectContent
- type DateChange
- type DiscussionReplyCreatedOriginatorBody
- type DiscussionReplyCreatedOriginatorSubject
- type DiscussionReplyEmailContent
- type DiscussionReplyEmailContentDB
- type MockTemplateService
- type MockTemplateServiceMockRecorder
- type ModelPlanCreatedBodyContent
- type ModelPlanCreatedSubjectContent
- type ModelPlanDateChangedBodyContent
- type ModelPlanDateChangedSubjectContent
- type ModelPlanShareBodyContent
- type ModelPlanShareSubjectContent
- type PlanDiscussionCreatedBodyContent
- type PlanDiscussionCreatedSubjectContent
- type PlanDiscussionTaggedSolutionBodyContent
- type PlanDiscussionTaggedSolutionSubjectContent
- type PlanDiscussionTaggedUserBodyContent
- type PlanDiscussionTaggedUserSubjectContent
- type ReportAProblemBodyContent
- type ReportAProblemSubjectContent
- type SendFeedbackBodyContent
- type SendFeedbackSubjectContent
- type SolutionSelectedBodyContent
- type SolutionSelectedDB
- type SolutionSelectedSubjectContent
- type TemplateService
- type TemplateServiceImpl
Constants ¶
const AddedAsCollaboratorTemplateName string = "added_as_collaborator"
AddedAsCollaboratorTemplateName is the template name definition for the corresponding email template
const AggregatedDailyDigestTemplateName string = "aggregated_daily_digest"
AggregatedDailyDigestTemplateName is the template name definition for the corresponding email template
const DailyDigestTemplateName string = "daily_digest"
DailyDigestTemplateName is the template name definition for the corresponding email template
const DiscussionReplyCreatedOriginatorTemplateName string = "discussion_reply_created_originator"
DiscussionReplyCreatedOriginatorTemplateName is the template name definition for the corresponding email template
const ModelPlanCreatedTemplateName string = "model_plan_created"
ModelPlanCreatedTemplateName is the template name definition for the corresponding email template
const ModelPlanDateChangedTemplateName string = "model_plan_date_changed"
ModelPlanDateChangedTemplateName is the template name definition for the corresponding email template
ModelPlanShareTemplateName is the template name definition for the corresponding email template
const PlanDiscussionCreatedTemplateName string = "plan_discussion_created"
PlanDiscussionCreatedTemplateName is the template name definition for the corresponding email template
const PlanDiscussionTaggedPossibleSolutionTemplateName string = "plan_discussion_tagged_solution"
PlanDiscussionTaggedPossibleSolutionTemplateName is the template name definition for the corresponding email template
const PlanDiscussionTaggedUserTemplateName string = "plan_discussion_tagged_user"
PlanDiscussionTaggedUserTemplateName is the template name definition for the corresponding email template
const ReportAProblemTemplateName string = "report_a_problem"
ReportAProblemTemplateName is the template name definition for the corresponding email template
const SendFeedbackTemplateName string = "send_feedback"
SendFeedbackTemplateName is the template name definition of the send feedback email template
const SolutionSelectedTemplateName string = "solution_selected"
SolutionSelectedTemplateName is the template name for the solution selected email that is sent to solution POCS
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddedAsCollaboratorBodyContent ¶
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 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 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 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 ¶
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 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 ¶
func (m *MockTemplateService) EXPECT() *MockTemplateServiceMockRecorder
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 ¶
func (mr *MockTemplateServiceMockRecorder) Load() *gomock.Call
Load indicates an expected call of Load.
type ModelPlanCreatedBodyContent ¶
type ModelPlanCreatedBodyContent struct { ClientAddress string ModelName string ModelID string UserName string }
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 }
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 {}
ModelPlanShareBodyContent defines the parameters necessary for the corresponding email body
type ModelPlanShareSubjectContent ¶
type ModelPlanShareSubjectContent struct {
}ModelPlanShareSubjectContent 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
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 ¶
PlanDiscussionTaggedUserSubjectContent defines the parameters necessary for the corresponding email subject
type ReportAProblemBodyContent ¶
type ReportAProblemBodyContent struct { 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 { 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 SolutionSelectedBodyContent ¶
type SolutionSelectedBodyContent struct { ClientAddress string FilterView string SolutionName string SolutionStatus string ModelLeadNames string NeedName string ModelID string ModelName string ModelAbbreviation string ModelStatus string ModelStartDate *time.Time }
SolutionSelectedBodyContent defines the parameters necessary for the corresponding email body
type SolutionSelectedDB ¶
type SolutionSelectedDB 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 }
SolutionSelectedDB this represents the data retrieved from the database for when a solution is selected from the database
func (*SolutionSelectedDB) ToSolutionSelectedBodyContent ¶
func (ssdb *SolutionSelectedDB) ToSolutionSelectedBodyContent(clientAddress string) SolutionSelectedBodyContent
ToSolutionSelectedBodyContent converts a SolutionSelectedDB struct to SolutionSelctedBodyContent
type SolutionSelectedSubjectContent ¶
SolutionSelectedSubjectContent defines the parameters necessary for the corresponding 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
Source Files ¶
- added_as_collaborator.go
- address_book.go
- aggregated_daily_digest.go
- daily_digest.go
- discussion_reply_created_originator.go
- model_plan_created.go
- model_plan_date_changed.go
- model_plan_share.go
- plan_discussion_created.go
- plan_discussion_tagged_solution.go
- plan_discussion_tagged_user.go
- report_a_problem.go
- send_feedback.go
- solution_selected.go
- template_service.go
- template_service_impl.go
- template_service_mock.go