Documentation
¶
Index ¶
- Constants
- type APIError
- type Client
- func (c *Client) EnableEventWebhookSignature() (string, error)
- func (c *Client) GetEventWebhookSettings() (*EventWebhookSettings, error)
- func (c *Client) SendEmail(request MailSendRequest) (*MailSendResult, error)
- func (c *Client) UpdateEventWebhookSettings(settings EventWebhookSettings) error
- func (c *Client) UpsertContact(request UpsertContactsRequest) (*UpsertContactResult, error)
- func (c *Client) Verify() error
- type Configuration
- type ContactInput
- type CreateOrUpdateContact
- func (c *CreateOrUpdateContact) Actions() []core.Action
- func (c *CreateOrUpdateContact) Cancel(ctx core.ExecutionContext) error
- func (c *CreateOrUpdateContact) Cleanup(ctx core.SetupContext) error
- func (c *CreateOrUpdateContact) Color() string
- func (c *CreateOrUpdateContact) Configuration() []configuration.Field
- func (c *CreateOrUpdateContact) Description() string
- func (c *CreateOrUpdateContact) Documentation() string
- func (c *CreateOrUpdateContact) ExampleOutput() map[string]any
- func (c *CreateOrUpdateContact) Execute(ctx core.ExecutionContext) error
- func (c *CreateOrUpdateContact) HandleAction(ctx core.ActionContext) error
- func (c *CreateOrUpdateContact) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (c *CreateOrUpdateContact) Icon() string
- func (c *CreateOrUpdateContact) Label() string
- func (c *CreateOrUpdateContact) Name() string
- func (c *CreateOrUpdateContact) OutputChannels(configuration any) []core.OutputChannel
- func (c *CreateOrUpdateContact) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *CreateOrUpdateContact) Setup(ctx core.SetupContext) error
- type CreateOrUpdateContactConfiguration
- type CreateOrUpdateContactFailure
- type CreateOrUpdateContactMetadata
- type EmailAddress
- type EmailContent
- type EventWebhookSettings
- type MailSendRequest
- type MailSendResult
- type Metadata
- type OnEmailEvent
- func (t *OnEmailEvent) Actions() []core.Action
- func (t *OnEmailEvent) Cleanup(ctx core.TriggerContext) error
- func (t *OnEmailEvent) Color() string
- func (t *OnEmailEvent) Configuration() []configuration.Field
- func (t *OnEmailEvent) Description() string
- func (t *OnEmailEvent) Documentation() string
- func (t *OnEmailEvent) ExampleData() map[string]any
- func (t *OnEmailEvent) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (t *OnEmailEvent) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (t *OnEmailEvent) Icon() string
- func (t *OnEmailEvent) Label() string
- func (t *OnEmailEvent) Name() string
- func (t *OnEmailEvent) Setup(ctx core.TriggerContext) error
- type OnEmailEventConfiguration
- type Personalization
- type SendEmail
- func (c *SendEmail) Actions() []core.Action
- func (c *SendEmail) Cancel(ctx core.ExecutionContext) error
- func (c *SendEmail) Cleanup(ctx core.SetupContext) error
- func (c *SendEmail) Color() string
- func (c *SendEmail) Configuration() []configuration.Field
- func (c *SendEmail) Description() string
- func (c *SendEmail) Documentation() string
- func (c *SendEmail) ExampleOutput() map[string]any
- func (c *SendEmail) Execute(ctx core.ExecutionContext) error
- func (c *SendEmail) HandleAction(ctx core.ActionContext) error
- func (c *SendEmail) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (c *SendEmail) Icon() string
- func (c *SendEmail) Label() string
- func (c *SendEmail) Name() string
- func (c *SendEmail) OutputChannels(configuration any) []core.OutputChannel
- func (c *SendEmail) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *SendEmail) Setup(ctx core.SetupContext) error
- type SendEmailConfiguration
- type SendEmailFailure
- type SendEmailMetadata
- type SendGrid
- func (s *SendGrid) Actions() []core.Action
- func (s *SendGrid) Cleanup(ctx core.IntegrationCleanupContext) error
- func (s *SendGrid) Components() []core.Component
- func (s *SendGrid) Configuration() []configuration.Field
- func (s *SendGrid) Description() string
- func (s *SendGrid) HandleAction(ctx core.IntegrationActionContext) error
- func (s *SendGrid) HandleRequest(ctx core.HTTPRequestContext)
- func (s *SendGrid) Icon() string
- func (s *SendGrid) Instructions() string
- func (s *SendGrid) Label() string
- func (s *SendGrid) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (s *SendGrid) Name() string
- func (s *SendGrid) Sync(ctx core.SyncContext) error
- func (s *SendGrid) Triggers() []core.Trigger
- type SendGridWebhookHandler
- type SignedWebhookResponse
- type SignedWebhookSettings
- type UpsertContactResult
- type UpsertContactsRequest
- type UpsertContactsResponse
Constants ¶
View Source
const ( UpsertContactPayloadType = "sendgrid.contact.upserted" UpsertContactFailedPayloadType = "sendgrid.contact.failed" UpsertContactFailedChannel = "failed" )
View Source
const ( SendEmailPayloadType = "sendgrid.email.sent" SendEmailFailedPayloadType = "sendgrid.email.failed" SendEmailFailedChannel = "failed" )
View Source
const EmailEventPayloadType = "sendgrid.email.event"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func NewClient ¶
func NewClient(httpClient core.HTTPContext, ctx core.IntegrationContext) (*Client, error)
func (*Client) EnableEventWebhookSignature ¶
func (*Client) GetEventWebhookSettings ¶
func (c *Client) GetEventWebhookSettings() (*EventWebhookSettings, error)
func (*Client) SendEmail ¶
func (c *Client) SendEmail(request MailSendRequest) (*MailSendResult, error)
func (*Client) UpdateEventWebhookSettings ¶
func (c *Client) UpdateEventWebhookSettings(settings EventWebhookSettings) error
func (*Client) UpsertContact ¶
func (c *Client) UpsertContact(request UpsertContactsRequest) (*UpsertContactResult, error)
type Configuration ¶
type ContactInput ¶
type CreateOrUpdateContact ¶
type CreateOrUpdateContact struct{}
func (*CreateOrUpdateContact) Actions ¶
func (c *CreateOrUpdateContact) Actions() []core.Action
func (*CreateOrUpdateContact) Cancel ¶
func (c *CreateOrUpdateContact) Cancel(ctx core.ExecutionContext) error
func (*CreateOrUpdateContact) Cleanup ¶
func (c *CreateOrUpdateContact) Cleanup(ctx core.SetupContext) error
func (*CreateOrUpdateContact) Color ¶
func (c *CreateOrUpdateContact) Color() string
func (*CreateOrUpdateContact) Configuration ¶
func (c *CreateOrUpdateContact) Configuration() []configuration.Field
func (*CreateOrUpdateContact) Description ¶
func (c *CreateOrUpdateContact) Description() string
func (*CreateOrUpdateContact) Documentation ¶
func (c *CreateOrUpdateContact) Documentation() string
func (*CreateOrUpdateContact) ExampleOutput ¶
func (c *CreateOrUpdateContact) ExampleOutput() map[string]any
func (*CreateOrUpdateContact) Execute ¶
func (c *CreateOrUpdateContact) Execute(ctx core.ExecutionContext) error
func (*CreateOrUpdateContact) HandleAction ¶
func (c *CreateOrUpdateContact) HandleAction(ctx core.ActionContext) error
func (*CreateOrUpdateContact) HandleWebhook ¶
func (c *CreateOrUpdateContact) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*CreateOrUpdateContact) Icon ¶
func (c *CreateOrUpdateContact) Icon() string
func (*CreateOrUpdateContact) Label ¶
func (c *CreateOrUpdateContact) Label() string
func (*CreateOrUpdateContact) Name ¶
func (c *CreateOrUpdateContact) Name() string
func (*CreateOrUpdateContact) OutputChannels ¶
func (c *CreateOrUpdateContact) OutputChannels(configuration any) []core.OutputChannel
func (*CreateOrUpdateContact) ProcessQueueItem ¶
func (c *CreateOrUpdateContact) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
func (*CreateOrUpdateContact) Setup ¶
func (c *CreateOrUpdateContact) Setup(ctx core.SetupContext) error
type CreateOrUpdateContactConfiguration ¶
type CreateOrUpdateContactConfiguration struct {
Email string `json:"email" mapstructure:"email"`
FirstName string `json:"firstName" mapstructure:"firstName"`
LastName string `json:"lastName" mapstructure:"lastName"`
ListIDs []string `json:"listIds" mapstructure:"listIds"`
CustomFields map[string]any `json:"customFields" mapstructure:"customFields"`
}
type CreateOrUpdateContactMetadata ¶
type CreateOrUpdateContactMetadata struct {
Email string `json:"email" mapstructure:"email"`
}
type EmailAddress ¶
type EmailContent ¶
type EventWebhookSettings ¶
type EventWebhookSettings struct {
Enabled bool `json:"enabled"`
URL string `json:"url"`
Processed bool `json:"processed"`
Delivered bool `json:"delivered"`
Deferred bool `json:"deferred"`
Bounce bool `json:"bounce"`
Dropped bool `json:"dropped"`
Open bool `json:"open"`
Click bool `json:"click"`
SpamReport bool `json:"spam_report"`
Unsubscribe bool `json:"unsubscribe"`
GroupUnsubscribe bool `json:"group_unsubscribe"`
GroupResubscribe bool `json:"group_resubscribe"`
}
type MailSendRequest ¶
type MailSendRequest struct {
Personalizations []Personalization `json:"personalizations"`
From EmailAddress `json:"from"`
ReplyTo *EmailAddress `json:"reply_to,omitempty"`
Subject string `json:"subject,omitempty"`
Content []EmailContent `json:"content,omitempty"`
TemplateID string `json:"template_id,omitempty"`
Categories []string `json:"categories,omitempty"`
}
type MailSendResult ¶
type OnEmailEvent ¶
type OnEmailEvent struct{}
func (*OnEmailEvent) Actions ¶
func (t *OnEmailEvent) Actions() []core.Action
func (*OnEmailEvent) Cleanup ¶
func (t *OnEmailEvent) Cleanup(ctx core.TriggerContext) error
func (*OnEmailEvent) Color ¶
func (t *OnEmailEvent) Color() string
func (*OnEmailEvent) Configuration ¶
func (t *OnEmailEvent) Configuration() []configuration.Field
func (*OnEmailEvent) Description ¶
func (t *OnEmailEvent) Description() string
func (*OnEmailEvent) Documentation ¶
func (t *OnEmailEvent) Documentation() string
func (*OnEmailEvent) ExampleData ¶
func (t *OnEmailEvent) ExampleData() map[string]any
func (*OnEmailEvent) HandleAction ¶
func (t *OnEmailEvent) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
func (*OnEmailEvent) HandleWebhook ¶
func (t *OnEmailEvent) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*OnEmailEvent) Icon ¶
func (t *OnEmailEvent) Icon() string
func (*OnEmailEvent) Label ¶
func (t *OnEmailEvent) Label() string
func (*OnEmailEvent) Name ¶
func (t *OnEmailEvent) Name() string
func (*OnEmailEvent) Setup ¶
func (t *OnEmailEvent) Setup(ctx core.TriggerContext) error
type OnEmailEventConfiguration ¶
type OnEmailEventConfiguration struct {
EventTypes []string `json:"eventTypes" mapstructure:"eventTypes"`
CategoryFilter []configuration.Predicate `json:"categoryFilter" mapstructure:"categoryFilter"`
}
type Personalization ¶
type Personalization struct {
To []EmailAddress `json:"to,omitempty"`
Cc []EmailAddress `json:"cc,omitempty"`
Bcc []EmailAddress `json:"bcc,omitempty"`
DynamicTemplateData map[string]any `json:"dynamic_template_data,omitempty"`
Subject string `json:"subject,omitempty"`
}
type SendEmail ¶
type SendEmail struct{}
func (*SendEmail) Configuration ¶
func (c *SendEmail) Configuration() []configuration.Field
func (*SendEmail) Description ¶
func (*SendEmail) Documentation ¶
func (*SendEmail) ExampleOutput ¶
func (*SendEmail) HandleAction ¶
func (c *SendEmail) HandleAction(ctx core.ActionContext) error
func (*SendEmail) HandleWebhook ¶
func (c *SendEmail) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
func (*SendEmail) OutputChannels ¶
func (c *SendEmail) OutputChannels(configuration any) []core.OutputChannel
func (*SendEmail) ProcessQueueItem ¶
type SendEmailConfiguration ¶
type SendEmailConfiguration struct {
To string `json:"to" mapstructure:"to"`
Subject string `json:"subject" mapstructure:"subject"`
Body string `json:"body" mapstructure:"body"`
Mode string `json:"mode" mapstructure:"mode"`
HTMLBody string `json:"htmlBody" mapstructure:"htmlBody"`
Cc string `json:"cc" mapstructure:"cc"`
Bcc string `json:"bcc" mapstructure:"bcc"`
FromName string `json:"fromName" mapstructure:"fromName"`
FromEmail string `json:"fromEmail" mapstructure:"fromEmail"`
ReplyTo string `json:"replyTo" mapstructure:"replyTo"`
Categories string `json:"categories" mapstructure:"categories"`
TemplateID string `json:"templateId" mapstructure:"templateId"`
TemplateData map[string]any `json:"templateData" mapstructure:"templateData"`
}
type SendEmailFailure ¶
type SendEmailMetadata ¶
type SendGrid ¶
type SendGrid struct{}
func (*SendGrid) Components ¶
func (*SendGrid) Configuration ¶
func (s *SendGrid) Configuration() []configuration.Field
func (*SendGrid) Description ¶
func (*SendGrid) HandleAction ¶
func (s *SendGrid) HandleAction(ctx core.IntegrationActionContext) error
func (*SendGrid) HandleRequest ¶
func (s *SendGrid) HandleRequest(ctx core.HTTPRequestContext)
func (*SendGrid) Instructions ¶
func (*SendGrid) ListResources ¶
func (s *SendGrid) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type SendGridWebhookHandler ¶
type SendGridWebhookHandler struct{}
func (*SendGridWebhookHandler) Cleanup ¶
func (s *SendGridWebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
func (*SendGridWebhookHandler) CompareConfig ¶
func (s *SendGridWebhookHandler) CompareConfig(a, b any) (bool, error)
func (*SendGridWebhookHandler) Setup ¶
func (s *SendGridWebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)
type SignedWebhookResponse ¶
type SignedWebhookSettings ¶
type SignedWebhookSettings struct {
Enabled bool `json:"enabled"`
}
type UpsertContactResult ¶
type UpsertContactsRequest ¶
type UpsertContactsRequest struct {
Contacts []ContactInput `json:"contacts"`
ListIDs []string `json:"list_ids,omitempty"`
}
type UpsertContactsResponse ¶
type UpsertContactsResponse struct {
JobID string `json:"job_id"`
}
Click to show internal directories.
Click to hide internal directories.