Documentation
¶
Index ¶
- type Attachment
- type Client
- func (c *Client) SendEmail(ctx context.Context, recipient, subject, htmlBody string) (*ses.SendEmailOutput, error)
- func (c *Client) SendEmailWithAttachment(ctx context.Context, recipient, subject, htmlBody string, ...) (*ses.SendRawEmailOutput, error)
- func (c *Client) SendSMS(ctx context.Context, phoneNumber string, message string) (string, error)
- type ClientOption
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attachment ¶
type Client ¶
type Client struct {
Region string
AccessKeyID string
SecretAccessKey string
EmailSender string
SenderName string
PushNotificationARN string
// contains filtered or unexported fields
}
Client contains the AWS configuration and methods
func NewClient ¶
func NewClient(ctx context.Context, region, accessKey, secretKey string, opts ...ClientOption) (*Client, error)
NewClient creates and returns a new AWS Client from configuration
func (*Client) SendEmail ¶
func (c *Client) SendEmail(ctx context.Context, recipient, subject, htmlBody string) (*ses.SendEmailOutput, error)
SendEmail delivery an email utilizing the AWS SES service
func (*Client) SendEmailWithAttachment ¶
func (c *Client) SendEmailWithAttachment(ctx context.Context, recipient, subject, htmlBody string, attachments []Attachment) (*ses.SendRawEmailOutput, error)
SendEmailWithAttachment delivers an email with attachments using AWS SES
type ClientOption ¶
type ClientOption func(*Client)
ClientOption defines function type for client options
func WithEmailSender ¶
func WithEmailSender(emailSender string) ClientOption
WithEmailSender sets the email sender
func WithPushNotificationARN ¶
func WithPushNotificationARN(arn string) ClientOption
WithPushNotificationARN sets the push notification ARN
func WithRefreshTTL ¶
func WithRefreshTTL(ttl int64) ClientOption
WithRefreshTTL sets a custom refresh TTL in seconds
func WithSenderName ¶
func WithSenderName(senderName string) ClientOption
WithSenderName sets the sender name
func WithSessionTTL ¶
func WithSessionTTL(ttl int64) ClientOption
WithSessionTTL sets a custom session TTL in seconds
Click to show internal directories.
Click to hide internal directories.