sendgrid

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SendGridApiUrl = "https://api.sendgrid.com/v3/mail/send"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Content

type Content struct {
	Type  string `json:"type"`
	Value string `json:"value"`
}

type From

type From struct {
	Email string `json:"email"`
}

type Personalization

type Personalization struct {
	To []To `json:"to"`
}

type RestClient

type RestClient interface {
	Send(subject, from, to, content string) error
}

func NewRestClient

func NewRestClient(client *resty.Client, apiKey string) RestClient

func NewRestClientMock

func NewRestClientMock() RestClient

type RestClientMock

type RestClientMock struct {
	Subject string
	From    string
	To      string
	Content string
}

func (*RestClientMock) Send

func (r *RestClientMock) Send(subject, from, to, content string) error

type To

type To struct {
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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