sendgrid-go: Index | Files | Directories

package sendgrid

import ""


Package Files

base_interface.go sendgrid.go twilio_email.go


const (
    Version = "3.7.2"

Version is this client library's current version


var DefaultClient = rest.DefaultClient

DefaultClient is used if no custom HTTP client is defined

func API Uses

func API(request rest.Request) (*rest.Response, error)

API sets up the request to the Twilio SendGrid API, this is main interface. Please use the MakeRequest or MakeRequestAsync functions instead. (deprecated)

func GetRequest Uses

func GetRequest(key, endpoint, host string) rest.Request

GetRequest @return [Request] a default request object

func GetRequestSubuser Uses

func GetRequestSubuser(key, endpoint, host, subuser string) rest.Request

GetRequestSubuser like GetRequest but with On-Behalf of Subuser @return [Request] a default request object

func GetTwilioEmailRequest Uses

func GetTwilioEmailRequest(twilioEmailOptions TwilioEmailOptions) rest.Request

GetTwilioEmailRequest create Request @return [Request] a default request object

func MakeRequest Uses

func MakeRequest(request rest.Request) (*rest.Response, error)

MakeRequest attempts a Twilio SendGrid request synchronously.

func MakeRequestAsync Uses

func MakeRequestAsync(request rest.Request) (chan *rest.Response, chan error)

MakeRequestAsync attempts a request asynchronously in a new go routine. This function returns two channels: responses and errors. This function will retry in the case of a rate limit.

func MakeRequestRetry Uses

func MakeRequestRetry(request rest.Request) (*rest.Response, error)

MakeRequestRetry a synchronous request, but retry in the event of a rate limited response.

type Client Uses

type Client struct {

Client is the Twilio SendGrid Go client

func NewSendClient Uses

func NewSendClient(key string) *Client

NewSendClient constructs a new Twilio SendGrid client given an API key

func NewSendClientSubuser Uses

func NewSendClientSubuser(key, subuser string) *Client

GetRequestSubuser like NewSendClient but with On-Behalf of Subuser @return [Client]

func NewTwilioEmailSendClient Uses

func NewTwilioEmailSendClient(username, password string) *Client

NewTwilioEmailSendClient constructs a new Twilio Email client given a username and password

func (*Client) Send Uses

func (cl *Client) Send(email *mail.SGMailV3) (*rest.Response, error)

Send sends an email through Twilio SendGrid

type TwilioEmailOptions Uses

type TwilioEmailOptions struct {
    Username string
    Password string
    Endpoint string
    Host     string

TwilioEmailOptions for GetTwilioEmailRequest



Package sendgrid imports 7 packages (graph) and is imported by 148 packages. Updated 2020-11-19. Refresh now. Tools for package owners.