email

package
v0.0.0-...-b3f093e Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanizeSnakeCase

func HumanizeSnakeCase(s string) string

HumanizeSnakeCase replaces underscores with spaces and converts an uppercased word to a capitalized one

Types

type Client

type Client struct {
	SystemIntake *systemIntakeEmails
	// contains filtered or unexported fields
}

Client is an EASi SES client wrapper

func NewClient

func NewClient(config Config, sender sender) (Client, error)

NewClient returns a new email client for EASi

func (Client) SendCantFindSomethingEmail

func (c Client) SendCantFindSomethingEmail(ctx context.Context, input SendCantFindSomethingEmailInput) error

SendCantFindSomethingEmail sends an email to the EASI team containing a user's request for help

func (Client) SendCedarRolesChangedEmail

func (c Client) SendCedarRolesChangedEmail(
	ctx context.Context,
	requesterFullName string,
	targetFullName string,
	didAdd bool,
	didDelete bool,
	roleTypeNamesBefore []string,
	roleTypeNamesAfter []string,
	systemName string,
	timestamp time.Time,
) error

SendCedarRolesChangedEmail notifies someone that they've been added as an attendee on a TRB request

func (Client) SendFeedbackEmail

func (c Client) SendFeedbackEmail(ctx context.Context, input SendFeedbackEmailInput) error

SendFeedbackEmail sends an email to the EASI team containing feedback from a user

func (Client) SendLCIDExpirationAlertEmail

func (c Client) SendLCIDExpirationAlertEmail(
	ctx context.Context,
	recipients models.EmailNotificationRecipients,
	systemIntakeID uuid.UUID,
	projectName string,
	requesterName string,
	lcid string,
	lcidIssuedAt *time.Time,
	lcidExpirationDate *time.Time,
	scope models.HTML,
	lifecycleCostBaseline string,
	nextSteps models.HTML,
) error

SendLCIDExpirationAlertEmail sends an email to the governance mailbox notifying them about LCID that is expiring soon

func (Client) SendRejectRequestEmails

func (c Client) SendRejectRequestEmails(
	ctx context.Context,
	recipients models.EmailNotificationRecipients,
	systemIntakeID uuid.UUID,
	projectName string,
	requester string,
	reason models.HTML,
	nextSteps models.HTML,
	feedback models.HTML,
) error

SendRejectRequestEmails sends emails to multiple recipients (possibly including the IT Governance and IT Investment teams) for rejecting a request

func (Client) SendReportAProblemEmail

func (c Client) SendReportAProblemEmail(ctx context.Context, input SendReportAProblemEmailInput) error

SendReportAProblemEmail sends an email to the EASI team containing a user's request for help

func (Client) SendSystemIntakeReviewEmails

func (c Client) SendSystemIntakeReviewEmails(
	ctx context.Context,
	recipients models.EmailNotificationRecipients,
	systemIntakeID uuid.UUID,
	projectName string,
	requester string,
	emailText models.HTML,
) error

SendSystemIntakeReviewEmails sends emails to multiple recipients (possibly including the IT Governance and IT Investment teams) about GRT review on a submitted system intake

func (Client) SendTRBAdviceLetterInternalReviewEmail

func (c Client) SendTRBAdviceLetterInternalReviewEmail(ctx context.Context, input SendTRBAdviceLetterInternalReviewEmailInput) error

SendTRBAdviceLetterInternalReviewEmail sends an email to the EASI admin team indicating that an advice letter is ready for internal review

func (Client) SendTRBAdviceLetterSubmittedEmail

func (c Client) SendTRBAdviceLetterSubmittedEmail(ctx context.Context, input SendTRBAdviceLetterSubmittedEmailInput) error

SendTRBAdviceLetterSubmittedEmail sends an email to the EASI admin team indicating that an advice letter has been submitted

func (Client) SendTRBAttendeeAddedNotification

func (c Client) SendTRBAttendeeAddedNotification(
	ctx context.Context,
	attendeeEmail models.EmailAddress,
	requestName string,
	requesterName string,
) error

SendTRBAttendeeAddedNotification notifies someone that they've been added as an attendee on a TRB request

func (Client) SendTRBEditsNeededOnFormNotification

func (c Client) SendTRBEditsNeededOnFormNotification(
	ctx context.Context,
	recipients []models.EmailAddress,
	copyTRBMailbox bool,
	requestID uuid.UUID,
	requestName string,
	requesterName string,
	feedback models.HTML,
) error

SendTRBEditsNeededOnFormNotification notifies user-selected recipients that a TRB request form needs edits

func (Client) SendTRBFormSubmissionNotificationToAdmins

func (c Client) SendTRBFormSubmissionNotificationToAdmins(ctx context.Context, requestID uuid.UUID, requestName string, requesterName string, component string) error

SendTRBFormSubmissionNotificationToAdmins notifies the TRB admin mailbox that a TRB Request form has been submitted

func (Client) SendTRBFormSubmissionNotificationToRequester

func (c Client) SendTRBFormSubmissionNotificationToRequester(
	ctx context.Context,
	requestID uuid.UUID,
	requestName string,
	requesterEmail models.EmailAddress,
	requesterName string,
) error

SendTRBFormSubmissionNotificationToRequester notifies a TRB requester that their TRB Request form has been submitted

func (Client) SendTRBReadyForConsultNotification

func (c Client) SendTRBReadyForConsultNotification(
	ctx context.Context,
	recipients []models.EmailAddress,
	copyTRBMailbox bool,
	requestID uuid.UUID,
	requestName string,
	requesterName string,
	feedback models.HTML,
) error

SendTRBReadyForConsultNotification notifies user-selected recipients that a TRB request is ready for its consult session

func (Client) SendTRBRequestClosedEmail

func (c Client) SendTRBRequestClosedEmail(ctx context.Context, input SendTRBRequestClosedEmailInput) error

SendTRBRequestClosedEmail sends an email to the EASI admin team indicating that a TRB request has been closed

func (Client) SendTRBRequestConsultMeetingEmail

func (c Client) SendTRBRequestConsultMeetingEmail(ctx context.Context, input SendTRBRequestConsultMeetingEmailInput) error

SendTRBRequestConsultMeetingEmail sends an email to the EASI team containing a user's request for help

func (Client) SendTRBRequestReopenedEmail

func (c Client) SendTRBRequestReopenedEmail(ctx context.Context, input SendTRBRequestReopenedEmailInput) error

SendTRBRequestReopenedEmail sends an email to the EASI admin team indicating that a TRB request has been re-opened

func (Client) SendTRBRequestTRBLeadAssignedEmails

func (c Client) SendTRBRequestTRBLeadAssignedEmails(ctx context.Context, input SendTRBRequestTRBLeadEmailInput) error

SendTRBRequestTRBLeadAssignedEmails sends emails to the TRB team and the TRB lead when the lead is assigned to a TRB request

func (Client) SendTestEmail

func (c Client) SendTestEmail(ctx context.Context) error

SendTestEmail sends an email to a no-reply address

func (Client) SendWithdrawRequestEmail

func (c Client) SendWithdrawRequestEmail(ctx context.Context, requestName string) error

SendWithdrawRequestEmail sends an email for a submitted system intake

type Config

type Config struct {
	GRTEmail          models.EmailAddress
	ITInvestmentEmail models.EmailAddress
	EASIHelpEmail     models.EmailAddress
	TRBEmail          models.EmailAddress
	CEDARTeamEmail    models.EmailAddress
	URLHost           string
	URLScheme         string
	TemplateDirectory string
}

Config holds EASi application specific configs for SES

type SendCantFindSomethingEmailInput

type SendCantFindSomethingEmailInput struct {
	Name  string
	Email string
	Body  string
}

SendCantFindSomethingEmailInput contains the data submitted by the user to the "can't find find what you're looking for" help form

type SendFeedbackEmailInput

type SendFeedbackEmailInput struct {
	IsAnonymous            bool
	ReporterName           string
	ReporterEmail          string
	CanBeContacted         bool
	EasiServicesUsed       []string
	CmsRole                string
	SystemEasyToUse        string
	DidntNeedHelpAnswering string
	QuestionsWereRelevant  string
	HadAccessToInformation string
	HowSatisfied           string
	HowCanWeImprove        string
}

SendFeedbackEmailInput contains the data submitted by the user to send feedback

type SendReportAProblemEmailInput

type SendReportAProblemEmailInput struct {
	IsAnonymous            bool
	ReporterName           string
	ReporterEmail          string
	CanBeContacted         bool
	EasiService            string
	WhatWereYouDoing       string
	WhatWentWrong          string
	HowSevereWasTheProblem string
}

SendReportAProblemEmailInput contains the data submitted by the user to the "report a problem" help form

type SendTRBAdviceLetterInternalReviewEmailInput

type SendTRBAdviceLetterInternalReviewEmailInput struct {
	TRBRequestID   uuid.UUID
	TRBRequestName string
	TRBLeadName    string
}

SendTRBAdviceLetterInternalReviewEmailInput contains the data needed to to send the TRB advice letter internal review email

type SendTRBAdviceLetterSubmittedEmailInput

type SendTRBAdviceLetterSubmittedEmailInput struct {
	TRBRequestID   uuid.UUID
	RequestName    string
	RequestType    string
	RequesterName  string
	Component      string
	SubmissionDate *time.Time
	ConsultDate    *time.Time
	CopyTRBMailbox bool
	Recipients     []models.EmailAddress
}

SendTRBAdviceLetterSubmittedEmailInput contains the data needed to to send the TRB advice letter submitted email

type SendTRBRequestClosedEmailInput

type SendTRBRequestClosedEmailInput struct {
	TRBRequestID   uuid.UUID
	TRBRequestName string
	RequesterName  string
	Recipients     []models.EmailAddress
	CopyTRBMailbox bool
	ReasonClosed   models.HTML
}

SendTRBRequestClosedEmailInput contains the data needed to to send the TRB request closed email

type SendTRBRequestConsultMeetingEmailInput

type SendTRBRequestConsultMeetingEmailInput struct {
	TRBRequestID       uuid.UUID
	ConsultMeetingTime time.Time
	CopyTRBMailbox     bool
	NotifyEmails       []models.EmailAddress
	TRBRequestName     string
	Notes              string
	RequesterName      string
}

SendTRBRequestConsultMeetingEmailInput contains the data submitted by the user to the "report a problem" help form

type SendTRBRequestReopenedEmailInput

type SendTRBRequestReopenedEmailInput struct {
	TRBRequestID   uuid.UUID
	TRBRequestName string
	RequesterName  string
	Recipients     []models.EmailAddress
	CopyTRBMailbox bool
	ReasonReopened models.HTML
}

SendTRBRequestReopenedEmailInput contains the data needed to to send the TRB advice letter submitted email

type SendTRBRequestTRBLeadEmailInput

type SendTRBRequestTRBLeadEmailInput struct {
	TRBRequestID   uuid.UUID
	TRBRequestName string
	RequesterName  string
	TRBLeadName    string
	Component      string
	TRBLeadEmail   models.EmailAddress
}

SendTRBRequestTRBLeadEmailInput contains the data needed to send an email to the TRB team indicating that a TRB lead has been assigned

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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