email

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EmailTypeInbox represents an inbox email
	EmailTypeInbox = "inbox"
	// EmailTypeInbox represents a sent email
	EmailTypeSent = "sent"
	// EmailTypeInbox represents a draft email
	EmailTypeDraft = "draft"

	OrderAsc  = "asc"
	OrderDesc = "desc"
)

The constants representing email types

Variables

View Source
var (
	ErrMissingCredentials = errors.New("no credentials provided")
)

Functions

func SignSDKRequest

func SignSDKRequest(ctx context.Context, req *http.Request, options *SignSDKRequestOptions) error

Types

type Client

type Client struct {
	APIID       string
	Region      string
	Endpoint    string
	Credentials aws.CredentialsProvider
	Verbose     bool
}

func (*Client) Create

func (c *Client) Create(options CreateOptions) (string, error)

func (*Client) Delete

func (c *Client) Delete(options DeleteOptions) (string, error)

func (*Client) Get

func (c *Client) Get(options GetOptions) (string, error)

func (*Client) List

func (c *Client) List(options ListOptions) (string, error)

func (*Client) Save

func (c *Client) Save(options SaveOptions) (string, error)

func (*Client) Send

func (c *Client) Send(options SendOptions) (string, error)

func (*Client) Trash

func (c *Client) Trash(options TrashOptions) (string, error)

func (*Client) Untrash

func (c *Client) Untrash(options UntrashOptions) (string, error)

type CreateOptions

type CreateOptions struct {
	Subject      string   `json:"subject"`
	From         []string `json:"from"`
	To           []string `json:"to"`
	Cc           []string `json:"cc"`
	Bcc          []string `json:"bcc"`
	ReplyTo      []string `json:"replyTo"`
	Text         string   `json:"text"`
	HTML         string   `json:"html"`
	GenerateText string   `json:"generateText"`
	Send         bool     `json:"send"`

	File string `json:"-"`
}

type DeleteOptions

type DeleteOptions struct {
	MessageID string
}

type GetOptions

type GetOptions struct {
	MessageID string
}

type ListOptions

type ListOptions struct {
	Type       string
	Year       string
	Month      string
	Order      string // asc or desc (default)
	NextCursor string
}

type SaveOptions

type SaveOptions struct {
	MessageID    string   `json:"-"`
	Subject      string   `json:"subject"`
	From         []string `json:"from"`
	To           []string `json:"to"`
	Cc           []string `json:"cc"`
	Bcc          []string `json:"bcc"`
	ReplyTo      []string `json:"replyTo"`
	Body         string   `json:"body"`
	Text         string   `json:"text"`
	HTML         string   `json:"html"`
	GenerateText string   `json:"generateText"`
	Send         bool     `json:"send"`

	File string `json:"-"`
}

type SendOptions

type SendOptions struct {
	MessageID string
}

type SignSDKRequestOptions

type SignSDKRequestOptions struct {
	Credentials aws.CredentialsProvider
	Payload     []byte
	Region      string
	Verbose     bool
}

type TrashOptions

type TrashOptions struct {
	MessageID string
}

type UntrashOptions

type UntrashOptions struct {
	MessageID string
}

Jump to

Keyboard shortcuts

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