Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMissingField = errors.New("missing field is required")
Functions ¶
func HandleSendActivationEmail ¶
func HandleSendActivationEmail(mailerService *Service) http.HandlerFunc
func SendActivationEmail ¶
func SendActivationEmail(mailerService *Service) lambdaHandler
HandleSendActivationEmail is a lambda function that sends an email to a user. It is accessed through an AWS API Gateway.
Types ¶
type ActivationData ¶
type ActivationEmailData ¶
type ActivationEmailData struct { From string `json:"from"` To string `json:"to"` Subject string `json:"subject"` ActivationData `json:"activationData"` }
type EmailActivationData ¶
type EmailActivationData struct { From string `json:"from"` To string `json:"to"` Subject string `json:"subject"` Name string `json:"name"` ActivationHyperlink string `json:"activationHyperLink"` }
UserActivationData stores information needed to send an email to a user with instructions for activating their account.
type GrpcServer ¶
type GrpcServer struct { pb.UnimplementedMailerServer // contains filtered or unexported fields }
func NewGrpcServer ¶
func NewGrpcServer(mailerService *Service) GrpcServer
func (GrpcServer) SendActivationEmail ¶
func (gs GrpcServer) SendActivationEmail(ctx context.Context, r *pb.EmailRequest) (*pb.Response, error)
SendActivationEmail is a grpc implementation that can be called by other services to send an activation email to a user.
type Mailer ¶
type Mailer interface {
// contains filtered or unexported methods
}
Mailer defines methods for receiving data to send emails.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service defines methods that receive email data inputs, and prepares and validates those inputs before calling methods from the Mailer type to send that data out in an email. It can be implemented by any infrastructure to send emails.
func NewService ¶
Click to show internal directories.
Click to hide internal directories.