sendgrid

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Key string
}

Client represents a SendGrid Client

func (*Client) CreateTemplate

func (c *Client) CreateTemplate(template *Template) error

CreateTemplate creates a template

func (*Client) CreateTemplateVersion

func (c *Client) CreateTemplateVersion(version *TemplateVersion) error

CreateTemplateVersion creates a template version

func (*Client) DeleteTemplate

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

DeleteTemplate deletes a template

func (*Client) DeleteTemplateVersion

func (c *Client) DeleteTemplateVersion(template, id string) error

DeleteTemplateVersion deletes a template version

func (*Client) GetTemplate

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

GetTemplate gets a template

func (*Client) GetTemplateVersion

func (c *Client) GetTemplateVersion(template, id string) (*TemplateVersion, error)

GetTemplateVersion gets a template version

func (*Client) UpdateTemplate

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

UpdateTemplate updates a template

func (*Client) UpdateTemplateVersion

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

UpdateTemplateVersion updates a template

type Error

type Error struct {
	Message string `json:"error"`
}

Error represents an error

func (*Error) Error

func (e *Error) Error() string

Error returns the message

type Provider

type Provider struct{}

Provider for Hydra OAuth2 Server

func (*Provider) Definition

func (p *Provider) Definition() *schema.Provider

Definition returns the provider's schema

type Template

type Template struct {
	ID         string             `json:"id,omitempty"`
	Name       string             `json:"name,omitempty"`
	Generation string             `json:"generation,omitempty"`
	Versions   []*TemplateVersion `json:"versions,omitempty"`
}

Template represents a template

type TemplateResource

type TemplateResource struct{}

TemplateResource represent's the flient resource

func (*TemplateResource) Definition

func (r *TemplateResource) Definition() *schema.Resource

Definition returns the resource

type TemplateVersion

type TemplateVersion struct {
	ID           string `json:"id,omitempty"`
	Name         string `json:"name,omitempty"`
	TemplateID   string `json:"template_id,omitempty"`
	Subject      string `json:"subject,omitempty"`
	HTMLContent  string `json:"html_content,omitempty"`
	PlainContent string `json:"plain_content,omitempty"`
	Editor       string `json:"editor,omitempty"`
	Active       int    `json:"active,omitempty"`
}

TemplateVersion is a template content's version

type TemplateVersionResource

type TemplateVersionResource struct{}

TemplateVersionResource represent's the flient resource

func (*TemplateVersionResource) Definition

func (r *TemplateVersionResource) Definition() *schema.Resource

Definition returns the resource

Jump to

Keyboard shortcuts

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