Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogSender ¶
type LogSender struct {
Sender
}
LogSender implements Sender interface which logs the email, token and challenge to stderr and forwards to the wrapped Sender.
func (LogSender) SendChallenge ¶
type MemSender ¶
type MemSender struct {
Email, Token, Challenge string
}
MemEmail implements Sender interface to be used for testing.
func (*MemSender) SendChallenge ¶
type NullSender ¶
type NullSender struct{}
func (NullSender) SendChallenge ¶
func (s NullSender) SendChallenge(email, challenge string) error
func (NullSender) SendToken ¶
func (s NullSender) SendToken(email, token string) error
type SESConfig ¶
type SESConfig struct {
// The email address that is sending the email. This email address must be either
// individually verified with Amazon SES, or from a domain that has been verified
// with Amazon SES. For information about verifying identities, see the Amazon
// SES Developer Guide (https://docs.aws.amazon.com/ses/latest/DeveloperGuide/verify-addresses-and-domains.html).
Source string `yaml:"source"`
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to send for the email address specified in the Source parameter.
SourceArn string `yaml:"sourceArn"`
// The name of the configuration set to use when you send an email using SendTemplatedEmail.
// If you do not want to use a configuration set, set to empty string.
ConfigurationSetName string `yaml:"configurationSetName"`
// The reply-to email address(es) for the message. If the recipient replies
// to the message, each reply-to address will receive the reply.
ReplyToAddresses []string `yaml:"replyToAddresses"`
// The email address that bounces and complaints will be forwarded to when feedback
// forwarding is enabled. If the message cannot be delivered to the recipient,
// then an error message will be returned from the recipient's ISP; this message
// will then be forwarded to the email address specified by the ReturnPath parameter.
// The ReturnPath parameter is never overwritten. This email address must be
// either individually verified with Amazon SES, or from a domain that has been
// verified with Amazon SES.
ReturnPath string `yaml:"returnPath"`
// This parameter is used only for sending authorization. It is the ARN of the
// identity that is associated with the sending authorization policy that permits
// you to use the email address specified in the ReturnPath parameter.
ReturnPathArn string `yaml:"returnPathArn"`
// AWS SES email template to use when sending the delete confirmation email.
// The {{email}}, {{token}} and {{tokenEscaped}} variables in the template are replaced with values set by Vey.
DeleteTemplate string `yaml:"deleteTemplate"`
// AWS SES email template to use when sending the put confirmation email.
// The {{email}}, {{challenge}} and {{challengeEscaped}} variables in the template are replaced with values set by Vey.
PutTemplate string `yaml:"putTemplate"`
}
See https://pkg.go.dev/github.com/aws/aws-sdk-go/service/ses#SendTemplatedEmailInput for details.
type SESSender ¶
SESSender implements Sender interface using AWS SES.
func (SESSender) SendChallenge ¶
SendChallenge sends the challenge to the dst email address.
type Sender ¶
type Sender interface {
// SendToken sends a token to the email address.
// token is the base64 encoded form of Vey's BeginDelete func return value.
// The email recipient should call Vey server's CommitDelete API with the token.
SendToken(email, token string) error
// SendChallenge sends a challenge to the email address.
// challenge is the base64 encoded form of Vey's BeginPut func return value.
// The email recipient should sign the challenge with it's private key, and call Vey server's CommitPut API with the challenge and signature.
SendChallenge(email, challenge string) error
}
func NewLogSender ¶
func NewMemSender ¶
func NewMemSender() Sender
Click to show internal directories.
Click to hide internal directories.