sendgrid_client

package module
v0.0.0-...-4fb72ef Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2019 License: Apache-2.0 Imports: 4 Imported by: 1

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) DeleteTemplate

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

func (*Client) DeleteTemplateVersion

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

func (*Client) GetAllTemplates

func (client *Client) GetAllTemplates() (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) UpdateTemplate

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

func (*Client) UpdateTemplateVersion

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

func (*Client) Validate

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

type Template

type Template struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	Generation string `json:"generation,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

Jump to

Keyboard shortcuts

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