pinpointemail

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 6 Imported by: 0

README

aws-sdk-go-v2-wrapper | Pinpoint Email

Quick Usage

import (
	"context"

	"github.com/evalphobia/aws-sdk-go-v2-wrapper/config"
	"github.com/evalphobia/aws-sdk-go-v2-wrapper/pinpointemail"
)

func main() {
	svc, err := pinpointemail.New(config.Config{
		AccessKey: "<...>",
		SecretKey: "<...>",
	})
	if err != nil {
		panic(err)
	}
	ctx := context.Background()


	// text email
	err := svc.XSendEmailText(ctx, "My email report", "I love you!", "example@example.com", "example@example.com")
	if err != nil {
		panic(err)
	}

	// HTML email
	htmlBody := `<!DOCTYPE html><html lang="en"><body><p style="text-align: center;">I love you!</p></body></html>`
	err = svc.XSendEmailHTML(ctx, "My email report", htmlBody, "example@example.com", "example@example.com")
	if err != nil {
		panic(err)
	}
	// ...
}

X API

Name Description
XSendEmailHTML sends HTML type email.
XSendEmailText sends text type email.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PinpointEmail

type PinpointEmail struct {
	// contains filtered or unexported fields
}

PinpointEmail has PinpointEmail client.

func New

func New(conf config.Config) (*PinpointEmail, error)

New returns initialized *PinpointEmail.

func (*PinpointEmail) Errorf

func (svc *PinpointEmail) Errorf(format string, v ...interface{})

Errorf logging error information.

func (*PinpointEmail) GetClient

func (svc *PinpointEmail) GetClient() *SDK.Client

GetClient gets original SDK client.

func (*PinpointEmail) Infof

func (svc *PinpointEmail) Infof(format string, v ...interface{})

Infof logging information.

func (*PinpointEmail) RawCreateConfigurationSet

RawCreateConfigurationSet executes `CreateConfigurationSet` raw operation.

func (*PinpointEmail) RawCreateConfigurationSetEventDestination

RawCreateConfigurationSetEventDestination executes `CreateConfigurationSetEventDestination` raw operation.

func (*PinpointEmail) RawCreateDedicatedIpPool

RawCreateDedicatedIpPool executes `CreateDedicatedIpPool` raw operation.

func (*PinpointEmail) RawCreateDeliverabilityTestReport

RawCreateDeliverabilityTestReport executes `CreateDeliverabilityTestReport` raw operation.

func (*PinpointEmail) RawCreateEmailIdentity

RawCreateEmailIdentity executes `CreateEmailIdentity` raw operation.

func (*PinpointEmail) RawDeleteConfigurationSet

RawDeleteConfigurationSet executes `DeleteConfigurationSet` raw operation.

func (*PinpointEmail) RawDeleteConfigurationSetEventDestination

RawDeleteConfigurationSetEventDestination executes `DeleteConfigurationSetEventDestination` raw operation.

func (*PinpointEmail) RawDeleteDedicatedIpPool

RawDeleteDedicatedIpPool executes `DeleteDedicatedIpPool` raw operation.

func (*PinpointEmail) RawDeleteEmailIdentity

RawDeleteEmailIdentity executes `DeleteEmailIdentity` raw operation.

func (*PinpointEmail) RawGetAccount

func (svc *PinpointEmail) RawGetAccount(ctx context.Context, in *SDK.GetAccountInput) (*SDK.GetAccountResponse, error)

RawGetAccount executes `GetAccount` raw operation.

func (*PinpointEmail) RawGetBlacklistReports

RawGetBlacklistReports executes `GetBlacklistReports` raw operation.

func (*PinpointEmail) RawGetConfigurationSet

RawGetConfigurationSet executes `GetConfigurationSet` raw operation.

func (*PinpointEmail) RawGetConfigurationSetEventDestinations

RawGetConfigurationSetEventDestinations executes `GetConfigurationSetEventDestinations` raw operation.

func (*PinpointEmail) RawGetDedicatedIp

func (svc *PinpointEmail) RawGetDedicatedIp(ctx context.Context, in *SDK.GetDedicatedIpInput) (*SDK.GetDedicatedIpResponse, error)

RawGetDedicatedIp executes `GetDedicatedIp` raw operation.

func (*PinpointEmail) RawGetDedicatedIps

func (svc *PinpointEmail) RawGetDedicatedIps(ctx context.Context, in *SDK.GetDedicatedIpsInput) (*SDK.GetDedicatedIpsResponse, error)

RawGetDedicatedIps executes `GetDedicatedIps` raw operation.

func (*PinpointEmail) RawGetDeliverabilityDashboardOptions

RawGetDeliverabilityDashboardOptions executes `GetDeliverabilityDashboardOptions` raw operation.

func (*PinpointEmail) RawGetDeliverabilityTestReport

RawGetDeliverabilityTestReport executes `GetDeliverabilityTestReport` raw operation.

func (*PinpointEmail) RawGetDomainDeliverabilityCampaign

RawGetDomainDeliverabilityCampaign executes `GetDomainDeliverabilityCampaign` raw operation.

func (*PinpointEmail) RawGetDomainStatisticsReport

RawGetDomainStatisticsReport executes `GetDomainStatisticsReport` raw operation.

func (*PinpointEmail) RawGetEmailIdentity

RawGetEmailIdentity executes `GetEmailIdentity` raw operation.

func (*PinpointEmail) RawListConfigurationSets

RawListConfigurationSets executes `ListConfigurationSets` raw operation.

func (*PinpointEmail) RawListDedicatedIpPools

RawListDedicatedIpPools executes `ListDedicatedIpPools` raw operation.

func (*PinpointEmail) RawListDeliverabilityTestReports

RawListDeliverabilityTestReports executes `ListDeliverabilityTestReports` raw operation.

func (*PinpointEmail) RawListDomainDeliverabilityCampaigns

RawListDomainDeliverabilityCampaigns executes `ListDomainDeliverabilityCampaigns` raw operation.

func (*PinpointEmail) RawListEmailIdentities

RawListEmailIdentities executes `ListEmailIdentities` raw operation.

func (*PinpointEmail) RawListTagsForResource

RawListTagsForResource executes `ListTagsForResource` raw operation.

func (*PinpointEmail) RawPutAccountDedicatedIpWarmupAttributes

RawPutAccountDedicatedIpWarmupAttributes executes `PutAccountDedicatedIpWarmupAttributes` raw operation.

func (*PinpointEmail) RawPutAccountSendingAttributes

RawPutAccountSendingAttributes executes `PutAccountSendingAttributes` raw operation.

func (*PinpointEmail) RawPutConfigurationSetDeliveryOptions

RawPutConfigurationSetDeliveryOptions executes `PutConfigurationSetDeliveryOptions` raw operation.

func (*PinpointEmail) RawPutConfigurationSetReputationOptions

RawPutConfigurationSetReputationOptions executes `PutConfigurationSetReputationOptions` raw operation.

func (*PinpointEmail) RawPutConfigurationSetSendingOptions

RawPutConfigurationSetSendingOptions executes `PutConfigurationSetSendingOptions` raw operation.

func (*PinpointEmail) RawPutConfigurationSetTrackingOptions

RawPutConfigurationSetTrackingOptions executes `PutConfigurationSetTrackingOptions` raw operation.

func (*PinpointEmail) RawPutDedicatedIpInPool

RawPutDedicatedIpInPool executes `PutDedicatedIpInPool` raw operation.

func (*PinpointEmail) RawPutDedicatedIpWarmupAttributes

RawPutDedicatedIpWarmupAttributes executes `PutDedicatedIpWarmupAttributes` raw operation.

func (*PinpointEmail) RawPutDeliverabilityDashboardOption

RawPutDeliverabilityDashboardOption executes `PutDeliverabilityDashboardOption` raw operation.

func (*PinpointEmail) RawPutEmailIdentityDkimAttributes

RawPutEmailIdentityDkimAttributes executes `PutEmailIdentityDkimAttributes` raw operation.

func (*PinpointEmail) RawPutEmailIdentityFeedbackAttributes

RawPutEmailIdentityFeedbackAttributes executes `PutEmailIdentityFeedbackAttributes` raw operation.

func (*PinpointEmail) RawPutEmailIdentityMailFromAttributes

RawPutEmailIdentityMailFromAttributes executes `PutEmailIdentityMailFromAttributes` raw operation.

func (*PinpointEmail) RawSendEmail

func (svc *PinpointEmail) RawSendEmail(ctx context.Context, in *SDK.SendEmailInput) (*SDK.SendEmailResponse, error)

RawSendEmail executes `SendEmail` raw operation.

func (*PinpointEmail) RawTagResource

func (svc *PinpointEmail) RawTagResource(ctx context.Context, in *SDK.TagResourceInput) (*SDK.TagResourceResponse, error)

RawTagResource executes `TagResource` raw operation.

func (*PinpointEmail) RawUntagResource

func (svc *PinpointEmail) RawUntagResource(ctx context.Context, in *SDK.UntagResourceInput) (*SDK.UntagResourceResponse, error)

RawUntagResource executes `UntagResource` raw operation.

func (*PinpointEmail) RawUpdateConfigurationSetEventDestination

RawUpdateConfigurationSetEventDestination executes `UpdateConfigurationSetEventDestination` raw operation.

func (*PinpointEmail) SendEmail

SendEmail executes `SendEmail` operation.

func (*PinpointEmail) SetLogger

func (svc *PinpointEmail) SetLogger(logger log.Logger)

SetLogger sets logger.

func (*PinpointEmail) XSendEmailHTML

func (svc *PinpointEmail) XSendEmailHTML(ctx context.Context, subject, body, from string, to ...string) error

XSendEmailHTML sends HTML type email.

func (*PinpointEmail) XSendEmailText

func (svc *PinpointEmail) XSendEmailText(ctx context.Context, subject, body, from string, to ...string) error

XSendEmailText sends text type email.

type SendEmailRequest

type SendEmailRequest struct {
	To   []string
	Cc   []string
	Bcc  []string
	From string

	// for text or html
	Subject        string
	SubjectCharset string // optional
	HTMLBody       string
	HTMLCharset    string // optional
	TextBody       string
	TextCharset    string // optional

	// for template
	TemplateARN  string
	TemplateData string

	// for raw
	RawMessageData []byte

	ConfigurationSetName           string
	EmailTags                      []Tag
	FeedbackForwardingEmailAddress string
	ReplyToAddresses               []string
}

SendEmailRequest has parameters for `SendEmail` operation.

func (SendEmailRequest) ToInput

func (r SendEmailRequest) ToInput() *SDK.SendEmailInput

type SendEmailResult

type SendEmailResult struct {
	MessageID string
}

func NewSendEmailResult

func NewSendEmailResult(o *SDK.SendEmailResponse) *SendEmailResult

type Tag

type Tag struct {
	Key   string
	Value string
}

func (Tag) ToEmailTag

func (r Tag) ToEmailTag() SDK.MessageTag

func (Tag) ToSDK

func (r Tag) ToSDK() SDK.Tag

Jump to

Keyboard shortcuts

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