Versions in this module Expand all Collapse all v0 v0.2.0 Nov 3, 2026 Changes in this version + const Version + var ErrWebhookVerification = errors.New("exx: webhook verification failed") + type ApiKeyList = api.ListApiKey + type ApiKeysService struct + func (x *ApiKeysService) Create(ctx context.Context, r *CreateApiKeyRequest) (*CreatedApiKey, error) + func (x *ApiKeysService) List(ctx context.Context, o *ListOptions) (*ApiKeyList, error) + func (x *ApiKeysService) Remove(ctx context.Context, id string) (*Deleted, error) + type Attachment struct + Content string + ContentId string + ContentType string + Filename string + Path string + type AttemptList = api.ListAttempt + type BatchResult = api.BatchResult + type BatchService struct + func (x *BatchService) Send(ctx context.Context, emails []*SendEmailRequest) (*BatchResult, error) + func (x *BatchService) SendWithOptions(ctx context.Context, emails []*SendEmailRequest, o *SendOptions) (*BatchResult, error) + type Capabilities = api.Capabilities + type Client struct + ApiKeys *ApiKeysService + Batch *BatchService + Domains *DomainsService + Emails *EmailsService + Suppressions *SuppressionsService + Webhooks *WebhooksService + func NewClient(apiKey string, opts ...Option) *Client + type CreateApiKeyRequest struct + DomainId string + Name string + Permission PermissionField + type CreateDomainRequest struct + Capabilities *Capabilities + ClickTracking *bool + CustomReturnPath string + Name string + OpenTracking *bool + Region string + Tls string + TrackingSubdomain string + type CreateWebhookRequest struct + Endpoint string + Events []string + type CreatedApiKey = api.CreatedApiKey + type CreatedWebhook = api.CreatedWebhook + type Deleted = api.Deleted + type Domain = api.DomainView + type DomainList = api.ListDomainView + type DomainRef = api.DomainRef + type DomainsService struct + func (x *DomainsService) Create(ctx context.Context, r *CreateDomainRequest) (*Domain, error) + func (x *DomainsService) Get(ctx context.Context, id string) (*Domain, error) + func (x *DomainsService) List(ctx context.Context, o *ListOptions) (*DomainList, error) + func (x *DomainsService) Remove(ctx context.Context, id string) (*Deleted, error) + func (x *DomainsService) Update(ctx context.Context, id string, r *UpdateDomainRequest) (*DomainRef, error) + func (x *DomainsService) Verify(ctx context.Context, id string) (*DomainRef, error) + type Email = api.Email + type EmailId = api.EmailId + type EmailList = api.ListEmailSummary + type EmailRef = api.EmailRef + type EmailsService struct + func (x *EmailsService) Attempts(ctx context.Context, id string) (*AttemptList, error) + func (x *EmailsService) Cancel(ctx context.Context, id string) (*EmailRef, error) + func (x *EmailsService) Get(ctx context.Context, id string) (*Email, error) + func (x *EmailsService) List(ctx context.Context, o *ListOptions) (*EmailList, error) + func (x *EmailsService) Send(ctx context.Context, e *SendEmailRequest) (*EmailId, error) + func (x *EmailsService) SendWithOptions(ctx context.Context, e *SendEmailRequest, o *SendOptions) (*EmailId, error) + func (x *EmailsService) Transcript(ctx context.Context, id, attemptID string) (map[string]any, error) + func (x *EmailsService) Update(ctx context.Context, id string, r *UpdateEmailRequest) (*EmailRef, error) + type Error struct + Message string + Name string + SMTPCode int + StatusCode int + func (e *Error) Error() string + func (e *Error) Unwrap() error + type ListOptions struct + After string + Before string + Limit int + type Option func(*config) + func WithBaseURL(u string) Option + func WithHTTPClient(hc *http.Client) Option + func WithRetries(n int) Option + func WithSleep(sleep func(time.Duration)) Option + func WithTimeout(d time.Duration) Option + func WithUserAgent(ua string) Option + type PermissionField = api.PermissionField + type SMTPClient struct + func NewSMTPClient(apiKey string, opts ...SMTPOption) *SMTPClient + func (c *SMTPClient) Send(ctx context.Context, e *SendEmailRequest, o *SendOptions) (*EmailId, error) + type SMTPOption func(*SMTPClient) + func WithSMTPDialer(dial func(ctx context.Context, network, addr string) (net.Conn, error)) SMTPOption + func WithSMTPHost(host string) SMTPOption + func WithSMTPImplicitTLS(on bool) SMTPOption + func WithSMTPPort(port int) SMTPOption + func WithSMTPTLSConfig(cfg *tls.Config) SMTPOption + func WithSMTPTimeout(d time.Duration) SMTPOption + type SendEmailRequest struct + Attachments []Attachment + Bcc []string + Cc []string + From string + Headers map[string]string + Html string + ReplyTo []string + ScheduledAt string + Subject string + Tags []Tag + Text string + To []string + type SendOptions struct + IdempotencyKey string + Stream string + type SuppressionList = api.ListSuppression + type SuppressionRef = api.SuppressionRef + type SuppressionsService struct + func (x *SuppressionsService) Add(ctx context.Context, email string) (*SuppressionRef, error) + func (x *SuppressionsService) List(ctx context.Context, o *ListOptions) (*SuppressionList, error) + func (x *SuppressionsService) Remove(ctx context.Context, email string) (*SuppressionRef, error) + type Tag struct + Name string + Value string + type UpdateDomainRequest struct + Capabilities *Capabilities + ClickTracking *bool + OpenTracking *bool + Tls string + TrackingSubdomain string + type UpdateEmailRequest struct + ScheduledAt string + type UpdateWebhookRequest struct + Endpoint string + Events []string + Status string + type VerifyWebhookOptions struct + Headers WebhookHeaders + Now time.Time + Payload string + Tolerance time.Duration + WebhookSecret string + type Webhook = api.Webhook + type WebhookEvent struct + CreatedAt string + Data json.RawMessage + Type string + func VerifyWebhook(o *VerifyWebhookOptions) (*WebhookEvent, error) + type WebhookHeaders struct + Id string + Signature string + Timestamp string + func HeadersFrom(h http.Header) WebhookHeaders + type WebhookList = api.ListWebhook + type WebhookRef = api.WebhookRef + type WebhooksService struct + func (x *WebhooksService) Create(ctx context.Context, r *CreateWebhookRequest) (*CreatedWebhook, error) + func (x *WebhooksService) Get(ctx context.Context, id string) (*Webhook, error) + func (x *WebhooksService) List(ctx context.Context, o *ListOptions) (*WebhookList, error) + func (x *WebhooksService) Remove(ctx context.Context, id string) (*Deleted, error) + func (x *WebhooksService) RotateSigningSecret(ctx context.Context, id string) (*CreatedWebhook, error) + func (x *WebhooksService) Update(ctx context.Context, id string, r *UpdateWebhookRequest) (*WebhookRef, error) + func (x *WebhooksService) Verify(o *VerifyWebhookOptions) (*WebhookEvent, error)