Versions in this module Expand all Collapse all v0 v0.1.0 Jul 13, 2026 Changes in this version + const DefaultBaseURL + const DefaultRetries + const DefaultTimeoutMs + const MaxRetries + const MaxRetryDelay + func ModelToMap(v interface{}) (map[string]interface{}, error) + func Version() string + type ApiError struct + func (e *ApiError) Unwrap() error + type AuthenticationError struct + func (e *AuthenticationError) Unwrap() error + type AuthorizationError struct + func (e *AuthorizationError) Unwrap() error + type Config struct + APIKey string + BaseURL string + HTTPClient *http.Client + Retries int + TimeoutMs int + func NewConfig(apiKey string) Config + func (c *Config) Validate() error + type ConflictError struct + func (e *ConflictError) Unwrap() error + type ContactCategoriesResource struct + func (r *ContactCategoriesResource) Create(ctx context.Context, name string, slug *string) (*ContactCategoryItem, error) + func (r *ContactCategoriesResource) Delete(ctx context.Context, id string) (*StatusResponse, error) + func (r *ContactCategoriesResource) Get(ctx context.Context, id string) (*ContactCategoryItem, error) + func (r *ContactCategoriesResource) List(ctx context.Context, perPage *int, after, before *string) (*ContactCategoryListResponse, error) + func (r *ContactCategoriesResource) Update(ctx context.Context, id, name string, slug *string) (*ContactCategoryItem, error) + type ContactCategoryItem struct + ID string + Name string + Slug string + func (c *ContactCategoryItem) ToMap() (map[string]interface{}, error) + type ContactCategoryListResponse struct + Data []ContactCategoryItem + Pagination PaginationInfo + func (c *ContactCategoryListResponse) ToMap() (map[string]interface{}, error) + type ContactItem struct + Categories []ContactCategoryItem + CreatedAt string + Email string + FirstName *string + ID string + IsGloballyUnsubscribed bool + LastName *string + Phone *string + func (c *ContactItem) ToMap() (map[string]interface{}, error) + type ContactListResponse struct + Data []ContactItem + Pagination PaginationInfo + func (c *ContactListResponse) ToMap() (map[string]interface{}, error) + type ContactUpdateResponse struct + ID string + func (c *ContactUpdateResponse) ToMap() (map[string]interface{}, error) + type ContactsResource struct + func (r *ContactsResource) Create(ctx context.Context, req *CreateContactRequest) (*ContactItem, error) + func (r *ContactsResource) Delete(ctx context.Context, id string) (*StatusResponse, error) + func (r *ContactsResource) Get(ctx context.Context, id string) (*ContactItem, error) + func (r *ContactsResource) List(ctx context.Context, perPage *int, after, before *string) (*ContactListResponse, error) + func (r *ContactsResource) Update(ctx context.Context, id string, req *UpdateContactRequest) (*ContactUpdateResponse, error) + type CreateContactRequest struct + Categories []string + Email string + EmailTopics []string + FirstName *string + IsGloballyUnsubscribed *bool + LastName *string + Phone *string + func (c *CreateContactRequest) ToMap() (map[string]interface{}, error) + type CreateEmailTopicRequest struct + AutoSubscribe *bool + Description *string + Domain *EmailTopicDomainRef + Name string + Public *bool + Slug string + func (c *CreateEmailTopicRequest) ToMap() (map[string]interface{}, error) + type DomainItem struct + CreatedAt string + DomainName string + ID string + Status string + func (d *DomainItem) ToMap() (map[string]interface{}, error) + type DomainListResponse struct + Data []DomainItem + Pagination PaginationInfo + func (d *DomainListResponse) ToMap() (map[string]interface{}, error) + type DomainsResource struct + func (r *DomainsResource) Get(ctx context.Context, id string) (*DomainItem, error) + func (r *DomainsResource) List(ctx context.Context, perPage *int, after, before *string) (*DomainListResponse, error) + func (r *DomainsResource) Verify(ctx context.Context, domain string) (*StatusResponse, error) + type EmailAttachment struct + ContentDisposition string + ContentID string + DownloadURL string + ID string + Mime string + Name string + Size int + func (a *EmailAttachment) ToMap() (map[string]interface{}, error) + type EmailListItem struct + AttachmentsCount int + CreatedAt string + EventName *string + ID string + RecipientsCount int + SentAt *string + Status string + Subject *string + Type string + func (e *EmailListItem) ToMap() (map[string]interface{}, error) + type EmailListResponse struct + Data []EmailListItem + Pagination PaginationInfo + func (e *EmailListResponse) ToMap() (map[string]interface{}, error) + type EmailTopicDomainRef struct + ID string + Name *string + func (e *EmailTopicDomainRef) ToMap() (map[string]interface{}, error) + type EmailTopicItem struct + AutoSubscribe bool + CreatedAt string + Description *string + Domain *EmailTopicDomainRef + ID string + Name string + Public bool + Slug string + func (e *EmailTopicItem) ToMap() (map[string]interface{}, error) + type EmailTopicListResponse struct + Data []EmailTopicItem + Pagination PaginationInfo + func (e *EmailTopicListResponse) ToMap() (map[string]interface{}, error) + type EmailTopicsResource struct + func (r *EmailTopicsResource) Create(ctx context.Context, req *CreateEmailTopicRequest) (*EmailTopicItem, error) + func (r *EmailTopicsResource) Delete(ctx context.Context, id string) (*StatusResponse, error) + func (r *EmailTopicsResource) Get(ctx context.Context, id string) (*EmailTopicItem, error) + func (r *EmailTopicsResource) List(ctx context.Context, perPage *int, after, before *string) (*EmailTopicListResponse, error) + func (r *EmailTopicsResource) Update(ctx context.Context, id string, req *UpdateEmailTopicRequest) (*EmailTopicItem, error) + type EmailsResource struct + func (r *EmailsResource) Get(ctx context.Context, id string) (*ShowEmailResponse, error) + func (r *EmailsResource) List(ctx context.Context, perPage *int, after, before *string) (*EmailListResponse, error) + func (r *EmailsResource) Send(ctx context.Context, req *SendEmailRequest) (*SendEmailResponse, error) + func (r *EmailsResource) SendWithTemplate(ctx context.Context, req *SendWithTemplateRequest) (*SendEmailResponse, error) + func (r *EmailsResource) Verify(ctx context.Context, email string) (*VerifyEmailResponse, error) + type LetMeSendEmail struct + ContactCategories *ContactCategoriesResource + Contacts *ContactsResource + Domains *DomainsResource + EmailTopics *EmailTopicsResource + Emails *EmailsResource + func MustNew(apiKey string, opts ...Option) *LetMeSendEmail + func New(apiKey string, opts ...Option) (*LetMeSendEmail, error) + type LetMeSendEmailError struct + APICode string + Message string + RawBody string + RequestID string + ResponseHeaders map[string]string + StatusCode int + ValidationErrors map[string][]string + func (e *LetMeSendEmailError) Error() string + type NetworkError struct + func (e *NetworkError) Unwrap() error + type NotFoundError struct + func (e *NotFoundError) Unwrap() error + type Option func(*Config) + func WithBaseURL(baseURL string) Option + func WithHTTPClient(httpClient *http.Client) Option + func WithRetries(retries int) Option + func WithTimeout(timeoutMs int) Option + type PaginationInfo struct + Fetched int + HasMore bool + PerPage int + Total int + func (p *PaginationInfo) ToMap() (map[string]interface{}, error) + type RateLimitError struct + Limit int + Remaining int + ResetAt string + RetryAfter int + func (e *RateLimitError) Unwrap() error + type Recipient struct + BounceReason *string + BounceType *string + BouncedAt *string + ClickCount int + ClickedAt *string + ComplainedAt *string + ComplaintType *string + DeliveredAt *string + EmailAddress string + ErrorMessage *string + FailedAt *string + IsSuppressed bool + OpenCount int + OpenedAt *string + SentAt *string + Status string + SuppressionReason *string + Type string + func (r *Recipient) ToMap() (map[string]interface{}, error) + type SendAttachment struct + Content string + ContentDisposition string + ContentID string + Mime string + Name string + Path string + func (s *SendAttachment) ToMap() (map[string]interface{}, error) + type SendEmailRequest struct + Attachments []SendAttachment + Bcc []string + Cc []string + EmailTopicID *string + EventName *string + From string + HTML *string + Headers map[string]string + IdempotencyKey string + ReplyTo []string + Subject string + Text *string + To []string + Type *string + func (s *SendEmailRequest) ToMap() (map[string]interface{}, error) + type SendEmailResponse struct + Duplicate bool + Emails []string + ID string + RestrictedEmails []string + Status string + func (s *SendEmailResponse) ToMap() (map[string]interface{}, error) + type SendWithTemplateRequest struct + Attachments []SendAttachment + Bcc []string + Cc []string + EmailTopicID *string + EventName *string + From string + Headers map[string]string + IdempotencyKey string + ReplyTo []string + Subject *string + TemplateID string + TemplateVariables []TemplateVariable + To []string + Type *string + func (s *SendWithTemplateRequest) ToMap() (map[string]interface{}, error) + type SerializationError struct + func (e *SerializationError) Unwrap() error + type ShowEmailResponse struct + Attachments []EmailAttachment + AttachmentsCount int + CreatedAt string + EventName *string + ID string + Recipients []Recipient + RecipientsCount int + SentAt *string + Status string + Subject *string + Type string + func (s *ShowEmailResponse) ToMap() (map[string]interface{}, error) + type StatusResponse struct + Message *string + Status string + func (s *StatusResponse) ToMap() (map[string]interface{}, error) + type TemplateVariable struct + Key string + Type string + Value interface{} + func (t *TemplateVariable) ToMap() (map[string]interface{}, error) + type TimeoutError struct + func (e *TimeoutError) Unwrap() error + type UpdateContactRequest struct + Categories []string + EmailTopics []string + FirstName *string + IsGloballyUnsubscribed *bool + LastName *string + Phone *string + SyncCategories *bool + SyncEmailTopics *bool + func (u *UpdateContactRequest) ToMap() (map[string]interface{}, error) + type UpdateEmailTopicRequest struct + AutoSubscribe *bool + Description *string + Name *string + Public *bool + Slug *string + func (u *UpdateEmailTopicRequest) ToMap() (map[string]interface{}, error) + type ValidationError struct + func (e *ValidationError) Unwrap() error + type VerifyEmailResponse struct + BelongsTo *string + Disposable bool + DomainExists bool + Email string + HasMailbox bool + MXRecords bool + ReceiveEmail bool + RoleBased bool + Score int + Status string + ValidSyntax bool + func (v *VerifyEmailResponse) ToMap() (map[string]interface{}, error) + type WebhookSigningError = webhooks.WebhookSigningError + type WebhookVerificationError = webhooks.WebhookVerificationError