sendgrid_client

package module
v0.0.0-...-b7cb0d0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

README

terraform-client-sendgrid

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is the object that handles talking to the Datadog API. This maintains state information for a particular application connection.

func NewClient

func NewClient(apiKey string) *Client

NewClient returns a new datadog.Client which can be used to access the API methods. The expected argument is the API key.

func (*Client) ActivateTemplateVersion

func (client *Client) ActivateTemplateVersion(templateId, versionId string) (*TemplateVersion, error)

func (*Client) CreateTemplate

func (client *Client) CreateTemplate(template *Template) (*Template, error)

func (*Client) CreateTemplateVersion

func (client *Client) CreateTemplateVersion(version *TemplateVersion) (*TemplateVersion, error)

func (*Client) CreateWhitelabelDomain

func (client *Client) CreateWhitelabelDomain(whitelabeldomain *WhitelabelDomain) (*WhitelabelDomain, error)

func (*Client) DeleteAllWhitelabelDomainFromName

func (client *Client) DeleteAllWhitelabelDomainFromName(domain string) error

func (*Client) DeleteTemplate

func (client *Client) DeleteTemplate(id string) error

func (*Client) DeleteTemplateVersion

func (client *Client) DeleteTemplateVersion(templateId, versionId string) error

func (*Client) DeleteWhitelabelDomain

func (client *Client) DeleteWhitelabelDomain(id string) error

func (*Client) GetAllTemplates

func (client *Client) GetAllTemplates() (bool, error)

func (*Client) GetAllWhitelabelDomains

func (client *Client) GetAllWhitelabelDomains() (bool, error)

func (*Client) GetBody

func (client *Client) GetBody(reqbody interface{}) ([]byte, error)

func (*Client) GetTemplate

func (client *Client) GetTemplate(id string) (*Template, error)

func (*Client) GetTemplateVersion

func (client *Client) GetTemplateVersion(templateId, versionId string) (*TemplateVersion, error)

func (*Client) GetWhitelabelDomain

func (client *Client) GetWhitelabelDomain(id string) (*WhitelabelDomain, error)

func (*Client) GetWhitelabelDomainFromName

func (client *Client) GetWhitelabelDomainFromName(domain string) (*WhitelabelDomain, error)

func (*Client) UpdateTemplate

func (client *Client) UpdateTemplate(id string, template *Template) error

func (*Client) UpdateTemplateVersion

func (client *Client) UpdateTemplateVersion(id string, version *TemplateVersion) error

func (*Client) UpdateWhitelabelDomain

func (client *Client) UpdateWhitelabelDomain(id string, whitelabeldomain *WhitelabelDomain) error

func (*Client) Validate

func (client *Client) Validate() (bool, error)

type DNSRecord

type DNSRecord struct {
	Host  string `json:"host,omitempty"`
	Type  string `json:"type,omitempty"`
	Data  string `json:"data,omitempty"`
	Valid bool   `json:"valid,omitempty"`
}

Sendgrid DNS Entry from whitelabel domain responses.

type Template

type Template struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

Sendgrid Template

type TemplateVersion

type TemplateVersion struct {
	Id           string `json:"id,omitempty"`
	TemplateId   string `json:"template_id,omitempty"`
	Name         string `json:"name,omitempty"`
	Subject      string `json:"subject,omitempty"`
	HtmlContent  string `json:"html_content,omitempty"`
	PlainContent string `json:"plain_content,omitempty"`
	Active       int    `json:"active,omitempty"`
}

Sendgrid Template Version

type WhitelabelDomain

type WhitelabelDomain struct {
	Id                int                 `json:"id,omitempty"`
	Domain            string              `json:"domain,omitempty"`
	Subdomain         string              `json:"subdomain,omitempty"`
	Username          string              `json:"username,omitempty"`
	UserId            int                 `json:"user_id,omitempty"`
	AutomaticSecurity bool                `json:"automatic_security,omitempty"`
	CustomSpf         bool                `json:"custom_spf,omitempty"`
	Default           bool                `json:"default,omitempty"`
	Dns               WhitelabelDomainDNS `json:"dns,omitempty"`
}

Sendgrid Whitelabel Domain

type WhitelabelDomainDNS

type WhitelabelDomainDNS struct {
	// Fields returned for Create method
	MailCname DNSRecord `json:"mail_cname,omitempty"`
	Spf       DNSRecord `json:"spf,omitempty"`
	Dkim1     DNSRecord `json:"dkim1,omitempty"`
	Dkim2     DNSRecord `json:"dkim2,omitempty"`
	// Fields returned for other methods
	MailServer   DNSRecord `json:"mail_server,omitempty"`
	SubdomainSpf DNSRecord `json:"subdomain_spf,omitempty"`
	DomainSpf    DNSRecord `json:"domain_spf,omitempty"`
	Dkim         DNSRecord `json:"dkim,omitempty"`
}

type WhitelabelDomainList

type WhitelabelDomainList []WhitelabelDomain

Jump to

Keyboard shortcuts

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