fakemail

package module
v0.0.0-...-837ff07 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: MIT Imports: 8 Imported by: 0

README

fakemail

Embedded Go mock email-sending devtools

screenshot

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EmailsDeleteRequest

type EmailsDeleteRequest struct {
	DeleteAllEmails bool     `json:"deleteAllEmails"`
	DeleteEmailsIDs []string `json:"deleteEmailsIds"`
}

type EmailsGetRequest

type EmailsGetRequest struct {
	Emails           map[string]MockEmail `json:"emails"`
	LastUpdatedAtUTC time.Time            `json:"lastUpdatedAtUTC"`
}

type EmailsSendRequest

type EmailsSendRequest struct {
	Emails []MockEmail `json:"emails"`
}

type EmailsSendResponse

type EmailsSendResponse struct {
	EmailIDs []string `json:"emailIds"`
}

type MockEmail

type MockEmail struct {
	From string   `json:"from"`
	To   []string `json:"to"`

	Subject string `json:"subject"`
	Body    string `json:"body"`

	Metadata map[string]string `json:"metadata"`
}

type MockEmailSender

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

func NewMockSender

func NewMockSender() *MockEmailSender

func (*MockEmailSender) EmailViewer

func (m *MockEmailSender) EmailViewer(pathPrefix string) http.Handler

func (*MockEmailSender) Send

func (m *MockEmailSender) Send(emails ...MockEmail) []string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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