Documentation
¶
Overview ¶
Package transmitly is a small Go client for the Transmitly email API.
Index ¶
- Constants
- type APIError
- type Client
- func (c *Client) AddSuppression(ctx context.Context, in SuppressionInput) (map[string]any, error)
- func (c *Client) CreateDomain(ctx context.Context, domain string) (map[string]any, error)
- func (c *Client) CreateInboundRoute(ctx context.Context, in InboundRouteInput) (map[string]any, error)
- func (c *Client) CreateWebhook(ctx context.Context, in WebhookInput) (map[string]any, error)
- func (c *Client) GetEmail(ctx context.Context, id string) (map[string]any, error)
- func (c *Client) Health(ctx context.Context) (map[string]any, error)
- func (c *Client) ListDomains(ctx context.Context) (map[string]any, error)
- func (c *Client) ListInboundRoutes(ctx context.Context) (map[string]any, error)
- func (c *Client) ListMessages(ctx context.Context, params url.Values) (map[string]any, error)
- func (c *Client) ListSuppressions(ctx context.Context, params url.Values) (map[string]any, error)
- func (c *Client) ListWebhooks(ctx context.Context) (map[string]any, error)
- func (c *Client) SendEmail(ctx context.Context, in EmailInput) (*EmailAccepted, error)
- func (c *Client) Usage(ctx context.Context, params url.Values) (map[string]any, error)
- func (c *Client) VerifyDomain(ctx context.Context, id string) (map[string]any, error)
- type Delivery
- type Domain
- type EmailAccepted
- type EmailInput
- type InboundRouteInput
- type Message
- type SuppressionInput
- type WebhookInput
Constants ¶
View Source
const DefaultBaseURL = "https://transmitly.io"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type Client ¶
func (*Client) AddSuppression ¶
func (*Client) CreateDomain ¶
func (*Client) CreateInboundRoute ¶
func (*Client) CreateWebhook ¶
func (*Client) ListDomains ¶
func (*Client) ListInboundRoutes ¶
func (*Client) ListMessages ¶
func (*Client) ListSuppressions ¶
func (*Client) ListWebhooks ¶
func (*Client) SendEmail ¶
func (c *Client) SendEmail(ctx context.Context, in EmailInput) (*EmailAccepted, error)
type Delivery ¶
type Delivery struct {
ID string `json:"id"`
Recipient string `json:"recipient"`
Status string `json:"status"`
Attempts int `json:"attempts"`
ProviderID string `json:"provider_id"`
MXHost string `json:"mx_host"`
SMTPCode int `json:"smtp_code"`
EnhancedCode string `json:"enhanced_code"`
LastError string `json:"last_error"`
DeliveredAt string `json:"delivered_at"`
}
type EmailAccepted ¶
type EmailInput ¶
type EmailInput struct {
From string `json:"from"`
To any `json:"to"` // string or []string
ReplyTo string `json:"reply_to,omitempty"`
Subject string `json:"subject"`
HTML string `json:"html,omitempty"`
Text string `json:"text,omitempty"`
Stream string `json:"stream,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
Headers map[string]string `json:"headers,omitempty"`
}
type InboundRouteInput ¶
type SuppressionInput ¶
Click to show internal directories.
Click to hide internal directories.