tem

package
v1.0.0-beta.35 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2025 License: Apache-2.0 Imports: 14 Imported by: 4

Documentation

Overview

Package tem provides methods and message types of the tem v1alpha1 API.

Index

Constants

View Source
const (
	// If unspecified, the type of blocklist is unknown by default.
	BlocklistTypeUnknownType = BlocklistType("unknown_type")
	// The recipient's mailbox is full and cannot receive any new email.
	BlocklistTypeMailboxFull = BlocklistType("mailbox_full")
	// The recipient's mailbox does not exist.
	BlocklistTypeMailboxNotFound = BlocklistType("mailbox_not_found")
)
View Source
const (
	// If not specified, the auto-configuration state is unknown by default.
	DomainLastStatusAutoconfigStateReasonUnknownReason = DomainLastStatusAutoconfigStateReason("unknown_reason")
	// The token doesn't have the necessary permissions to manage the domain's DNS records.
	DomainLastStatusAutoconfigStateReasonPermissionDenied = DomainLastStatusAutoconfigStateReason("permission_denied")
	// The domain does not exist or isn't manageable by the token.
	DomainLastStatusAutoconfigStateReasonDomainNotFound = DomainLastStatusAutoconfigStateReason("domain_not_found")
)
View Source
const (
	// If unspecified, the status of the domain's record is unknown by default.
	DomainLastStatusRecordStatusUnknownRecordStatus = DomainLastStatusRecordStatus("unknown_record_status")
	// The record is valid.
	DomainLastStatusRecordStatusValid = DomainLastStatusRecordStatus("valid")
	// The record is invalid.
	DomainLastStatusRecordStatusInvalid = DomainLastStatusRecordStatus("invalid")
	// The record was not found.
	DomainLastStatusRecordStatusNotFound = DomainLastStatusRecordStatus("not_found")
)
View Source
const (
	// If unspecified, the status of the domain's reputation is unknown by default.
	DomainReputationStatusUnknownStatus = DomainReputationStatus("unknown_status")
	// The domain has an excellent reputation.
	DomainReputationStatusExcellent = DomainReputationStatus("excellent")
	// The domain has a good reputation.
	DomainReputationStatusGood = DomainReputationStatus("good")
	// The domain has an average reputation.
	DomainReputationStatusAverage = DomainReputationStatus("average")
	// The domain has a bad reputation.
	DomainReputationStatusBad = DomainReputationStatus("bad")
)
View Source
const (
	// If unspecified, the status of the domain is unknown by default.
	DomainStatusUnknown = DomainStatus("unknown")
	// The domain is checked.
	DomainStatusChecked = DomainStatus("checked")
	// The domain is unchecked.
	DomainStatusUnchecked = DomainStatus("unchecked")
	// The domain is invalid.
	DomainStatusInvalid = DomainStatus("invalid")
	// The domain is locked.
	DomainStatusLocked = DomainStatus("locked")
	// The domain is revoked.
	DomainStatusRevoked = DomainStatus("revoked")
	// The domain is pending, waiting to be checked.
	DomainStatusPending = DomainStatus("pending")
	// The domain is in process of auto-configuration of the domain's DNS zone.
	DomainStatusAutoconfiguring = DomainStatus("autoconfiguring")
)
View Source
const (
	// If unspecified, the flag type is unknown by default.
	EmailFlagUnknownFlag = EmailFlag("unknown_flag")
	// Refers to a non critical error received while sending the email(s). Soft bounced emails are retried.
	EmailFlagSoftBounce = EmailFlag("soft_bounce")
	// Refers to a critical error that happened while sending the email(s).
	EmailFlagHardBounce = EmailFlag("hard_bounce")
	// Refers to an email considered as spam.
	EmailFlagSpam = EmailFlag("spam")
	// Refers to an undelivered email because the recipient mailbox is full.
	EmailFlagMailboxFull = EmailFlag("mailbox_full")
	// Refers to an undelivered email because the recipient mailbox does not exist.
	EmailFlagMailboxNotFound = EmailFlag("mailbox_not_found")
	// Refers to an email slightly delayed by the recipient to ensure that Scaleway is not sending spam.
	EmailFlagGreylisted = EmailFlag("greylisted")
	// Refers to an email with a `send-before` tag to indicate the maximum time limit for the email to be sent.
	EmailFlagSendBeforeExpiration = EmailFlag("send_before_expiration")
	// Refers to an email blocked by a blocklist.
	EmailFlagBlocklisted = EmailFlag("blocklisted")
)
View Source
const (
	// If unspecified, the recipient type is unknown by default.
	EmailRcptTypeUnknownRcptType = EmailRcptType("unknown_rcpt_type")
	// Primary recipient.
	EmailRcptTypeTo = EmailRcptType("to")
	// Carbon copy recipient.
	EmailRcptTypeCc = EmailRcptType("cc")
	// Blind carbon copy recipient.
	EmailRcptTypeBcc = EmailRcptType("bcc")
)
View Source
const (
	// If unspecified, the status of the email is unknown by default.
	EmailStatusUnknown = EmailStatus("unknown")
	// The email is new.
	EmailStatusNew = EmailStatus("new")
	// The email is in the process of being sent.
	EmailStatusSending = EmailStatus("sending")
	// The email was sent.
	EmailStatusSent = EmailStatus("sent")
	// The sending of the email failed.
	EmailStatusFailed = EmailStatus("failed")
	// The sending of the email was canceled.
	EmailStatusCanceled = EmailStatus("canceled")
)
View Source
const (
	// Order by creation date (descending chronological order).
	ListBlocklistsRequestOrderByCreatedAtDesc = ListBlocklistsRequestOrderBy("created_at_desc")
	// Order by creation date (ascending chronological order).
	ListBlocklistsRequestOrderByCreatedAtAsc = ListBlocklistsRequestOrderBy("created_at_asc")
	// Order by blocklist ends date (descending chronological order).
	ListBlocklistsRequestOrderByEndsAtDesc = ListBlocklistsRequestOrderBy("ends_at_desc")
	// Order by blocklist ends date (ascending chronological order).
	ListBlocklistsRequestOrderByEndsAtAsc = ListBlocklistsRequestOrderBy("ends_at_asc")
)
View Source
const (
	// Order by creation date (descending chronological order).
	ListEmailsRequestOrderByCreatedAtDesc = ListEmailsRequestOrderBy("created_at_desc")
	// Order by creation date (ascending chronological order).
	ListEmailsRequestOrderByCreatedAtAsc = ListEmailsRequestOrderBy("created_at_asc")
	// Order by last update date (descending chronological order).
	ListEmailsRequestOrderByUpdatedAtDesc = ListEmailsRequestOrderBy("updated_at_desc")
	// Order by last update date (ascending chronological order).
	ListEmailsRequestOrderByUpdatedAtAsc = ListEmailsRequestOrderBy("updated_at_asc")
	// Order by status (descending alphabetical order).
	ListEmailsRequestOrderByStatusDesc = ListEmailsRequestOrderBy("status_desc")
	// Order by status (ascending alphabetical order).
	ListEmailsRequestOrderByStatusAsc = ListEmailsRequestOrderBy("status_asc")
	// Order by mail_from (descending alphabetical order).
	ListEmailsRequestOrderByMailFromDesc = ListEmailsRequestOrderBy("mail_from_desc")
	// Order by mail_from (ascending alphabetical order).
	ListEmailsRequestOrderByMailFromAsc = ListEmailsRequestOrderBy("mail_from_asc")
	// Order by mail recipient (descending alphabetical order).
	ListEmailsRequestOrderByMailRcptDesc = ListEmailsRequestOrderBy("mail_rcpt_desc")
	// Order by mail recipient (ascending alphabetical order).
	ListEmailsRequestOrderByMailRcptAsc = ListEmailsRequestOrderBy("mail_rcpt_asc")
	// Order by subject (descending alphabetical order).
	ListEmailsRequestOrderBySubjectDesc = ListEmailsRequestOrderBy("subject_desc")
	// Order by subject (ascending alphabetical order).
	ListEmailsRequestOrderBySubjectAsc = ListEmailsRequestOrderBy("subject_asc")
)
View Source
const (
	ListWebhookEventsRequestOrderByCreatedAtDesc = ListWebhookEventsRequestOrderBy("created_at_desc")
	ListWebhookEventsRequestOrderByCreatedAtAsc  = ListWebhookEventsRequestOrderBy("created_at_asc")
)
View Source
const (
	ListWebhooksRequestOrderByCreatedAtDesc = ListWebhooksRequestOrderBy("created_at_desc")
	ListWebhooksRequestOrderByCreatedAtAsc  = ListWebhooksRequestOrderBy("created_at_asc")
)
View Source
const (
	// If unspecified, the offer name is unknown by default.
	OfferNameUnknownName = OfferName("unknown_name")
	// The 'essential' offer.
	OfferNameEssential = OfferName("essential")
	// The 'scale' offer.
	OfferNameScale = OfferName("scale")
)
View Source
const (
	// If unspecified, the status is unknown by default.
	PoolStatusUnknownStatus = PoolStatus("unknown_status")
	// The pool is disabled.
	PoolStatusDisabled = PoolStatus("disabled")
	// The pool is being created.
	PoolStatusCreating = PoolStatus("creating")
	// The pool is ready to be used.
	PoolStatusReady = PoolStatus("ready")
	// The pool has an error status.
	PoolStatusError = PoolStatus("error")
)
View Source
const (
	// If unspecified, the frequency is unknown by default.
	ProjectSettingsPeriodicReportFrequencyUnknownFrequency = ProjectSettingsPeriodicReportFrequency("unknown_frequency")
	// The periodic report is sent once a month.
	ProjectSettingsPeriodicReportFrequencyMonthly = ProjectSettingsPeriodicReportFrequency("monthly")
	// The periodic report is sent once a week.
	ProjectSettingsPeriodicReportFrequencyWeekly = ProjectSettingsPeriodicReportFrequency("weekly")
	// The periodic report is sent once a day.
	ProjectSettingsPeriodicReportFrequencyDaily = ProjectSettingsPeriodicReportFrequency("daily")
)
View Source
const (
	// If unspecified, the status of the Webhook event is unknown by default.
	WebhookEventStatusUnknownStatus = WebhookEventStatus("unknown_status")
	// The Webhook event is being sent.
	WebhookEventStatusSending = WebhookEventStatus("sending")
	// The Webhook event was sent.
	WebhookEventStatusSent = WebhookEventStatus("sent")
	// The Webhook event cannot be sent after multiple retries.
	WebhookEventStatusFailed = WebhookEventStatus("failed")
)
View Source
const (
	// If unspecified, the type of the Webhook Event is unknown by default.
	WebhookEventTypeUnknownType = WebhookEventType("unknown_type")
	// The email was received and is in preparation to be sent to the recipient servers.
	WebhookEventTypeEmailQueued = WebhookEventType("email_queued")
	// The email was sent but hard-bounced by the recipient server.
	WebhookEventTypeEmailDropped = WebhookEventType("email_dropped")
	// The email was sent but soft-bounced by the recipient server. In this case, the sending of the email will be automatically retried.
	WebhookEventTypeEmailDeferred = WebhookEventType("email_deferred")
	// The email was successfully sent.
	WebhookEventTypeEmailDelivered = WebhookEventType("email_delivered")
	// The email resource was identified as spam by Scaleway or by the recipient server.
	WebhookEventTypeEmailSpam = WebhookEventType("email_spam")
	// The email hard-bounced with a "mailbox not found" error.
	WebhookEventTypeEmailMailboxNotFound = WebhookEventType("email_mailbox_not_found")
	// The email was blocked before it was sent, as the recipient matches a blocklist.
	WebhookEventTypeEmailBlocklisted = WebhookEventType("email_blocklisted")
	// A new blocklist is created.
	WebhookEventTypeBlocklistCreated = WebhookEventType("blocklist_created")
)
View Source
const (
	SMTPHost             = "smtp.tem.scw.cloud"
	SMTPPortUnsecure     = 25
	SMTPPort             = 587
	SMTPPortAlternative  = 2587
	SMTPSPort            = 465
	SMTPSPortAlternative = 2465

	MXBlackhole = "blackhole.scw-tem.cloud."
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

This API allows you to manage your Transactional Email services.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) BulkCreateBlocklists

func (s *API) BulkCreateBlocklists(req *BulkCreateBlocklistsRequest, opts ...scw.RequestOption) (*BulkCreateBlocklistsResponse, error)

BulkCreateBlocklists: Create multiple blocklists in a specific Project or Organization using the `region` parameter.

func (*API) CancelEmail

func (s *API) CancelEmail(req *CancelEmailRequest, opts ...scw.RequestOption) (*Email, error)

CancelEmail: You can cancel the sending of an email if it has not been sent yet. You must specify the `region` and the `email_id` of the email you want to cancel.

func (*API) CheckDomain

func (s *API) CheckDomain(req *CheckDomainRequest, opts ...scw.RequestOption) (*Domain, error)

CheckDomain: Perform an immediate DNS check of a domain using the `region` and `domain_id` parameters.

func (*API) CreateDomain

func (s *API) CreateDomain(req *CreateDomainRequest, opts ...scw.RequestOption) (*Domain, error)

CreateDomain: You must specify the `region`, `project_id` and `domain_name` to register a domain in a specific Project.

func (*API) CreateEmail

func (s *API) CreateEmail(req *CreateEmailRequest, opts ...scw.RequestOption) (*CreateEmailResponse, error)

CreateEmail: You must specify the `region`, the sender and the recipient's information and the `project_id` to send an email from a checked domain. The subject of the email must contain at least 6 characters.

func (*API) CreateWebhook

func (s *API) CreateWebhook(req *CreateWebhookRequest, opts ...scw.RequestOption) (*Webhook, error)

CreateWebhook: Create a new Webhook triggered by a list of event types and pushed to a Scaleway SNS ARN.

func (*API) DeleteBlocklist

func (s *API) DeleteBlocklist(req *DeleteBlocklistRequest, opts ...scw.RequestOption) error

DeleteBlocklist: You must specify the blocklist you want to delete by the `region` and `blocklist_id`.

func (*API) DeleteWebhook

func (s *API) DeleteWebhook(req *DeleteWebhookRequest, opts ...scw.RequestOption) error

DeleteWebhook: You must specify the Webhook you want to delete by the `region` and `webhook_id`. Deleting a Webhook is permanent and cannot be undone.

func (*API) GetDomain

func (s *API) GetDomain(req *GetDomainRequest, opts ...scw.RequestOption) (*Domain, error)

GetDomain: Retrieve information about a specific domain using the `region` and `domain_id` parameters. Monitor your domain's reputation and improve **average** and **bad** reputation statuses, using your domain's **Email activity** tab on the [Scaleway console](https://console.scaleway.com/transactional-email/domains) to get a more detailed report. Check out our [dedicated documentation](https://www.scaleway.com/en/docs/managed-services/transactional-email/reference-content/understanding-tem-reputation-score/) to improve your domain's reputation.

func (*API) GetDomainLastStatus

func (s *API) GetDomainLastStatus(req *GetDomainLastStatusRequest, opts ...scw.RequestOption) (*DomainLastStatus, error)

GetDomainLastStatus: Display SPF and DKIM records status and potential errors, including the found records to make debugging easier.

func (*API) GetEmail

func (s *API) GetEmail(req *GetEmailRequest, opts ...scw.RequestOption) (*Email, error)

GetEmail: Retrieve information about a specific email using the `email_id` and `region` parameters.

func (*API) GetProjectConsumption

func (s *API) GetProjectConsumption(req *GetProjectConsumptionRequest, opts ...scw.RequestOption) (*ProjectConsumption, error)

GetProjectConsumption: Get project resource consumption.

func (*API) GetProjectSettings

func (s *API) GetProjectSettings(req *GetProjectSettingsRequest, opts ...scw.RequestOption) (*ProjectSettings, error)

GetProjectSettings: Retrieve the project settings including periodic reports.

func (*API) GetStatistics

func (s *API) GetStatistics(req *GetStatisticsRequest, opts ...scw.RequestOption) (*Statistics, error)

GetStatistics: Get information on your emails' statuses.

func (*API) GetWebhook

func (s *API) GetWebhook(req *GetWebhookRequest, opts ...scw.RequestOption) (*Webhook, error)

GetWebhook: Retrieve information about a specific Webhook using the `webhook_id` and `region` parameters.

func (*API) ListBlocklists

func (s *API) ListBlocklists(req *ListBlocklistsRequest, opts ...scw.RequestOption) (*ListBlocklistsResponse, error)

ListBlocklists: Retrieve the list of blocklists.

func (*API) ListDomains

func (s *API) ListDomains(req *ListDomainsRequest, opts ...scw.RequestOption) (*ListDomainsResponse, error)

ListDomains: Retrieve domains in a specific Project or in a specific Organization using the `region` parameter.

func (*API) ListEmails

func (s *API) ListEmails(req *ListEmailsRequest, opts ...scw.RequestOption) (*ListEmailsResponse, error)

ListEmails: Retrieve the list of emails sent from a specific domain or for a specific Project or Organization. You must specify the `region`.

func (*API) ListOfferSubscriptions

func (s *API) ListOfferSubscriptions(req *ListOfferSubscriptionsRequest, opts ...scw.RequestOption) (*ListOfferSubscriptionsResponse, error)

ListOfferSubscriptions: Retrieve information about the offers you are subscribed to using the `project_id` and `region` parameters.

func (*API) ListOffers

func (s *API) ListOffers(req *ListOffersRequest, opts ...scw.RequestOption) (*ListOffersResponse, error)

ListOffers: Retrieve the list of the available and free-of-charge offers you can subscribe to.

func (*API) ListPools

func (s *API) ListPools(req *ListPoolsRequest, opts ...scw.RequestOption) (*ListPoolsResponse, error)

ListPools: Retrieve information about a sending pool, including its creation status and configuration parameters.

func (*API) ListWebhookEvents

func (s *API) ListWebhookEvents(req *ListWebhookEventsRequest, opts ...scw.RequestOption) (*ListWebhookEventsResponse, error)

ListWebhookEvents: Retrieve the list of Webhook events triggered from a specific Webhook or for a specific Project or Organization. You must specify the `region`.

func (*API) ListWebhooks

func (s *API) ListWebhooks(req *ListWebhooksRequest, opts ...scw.RequestOption) (*ListWebhooksResponse, error)

ListWebhooks: Retrieve Webhooks in a specific Project or in a specific Organization using the `region` parameter.

func (*API) Regions

func (s *API) Regions() []scw.Region

func (*API) RevokeDomain

func (s *API) RevokeDomain(req *RevokeDomainRequest, opts ...scw.RequestOption) (*Domain, error)

RevokeDomain: You must specify the domain you want to delete by the `region` and `domain_id`. Deleting a domain is permanent and cannot be undone.

func (*API) UpdateDomain

func (s *API) UpdateDomain(req *UpdateDomainRequest, opts ...scw.RequestOption) (*Domain, error)

UpdateDomain: Update a domain auto-configuration.

func (*API) UpdateOfferSubscription

func (s *API) UpdateOfferSubscription(req *UpdateOfferSubscriptionRequest, opts ...scw.RequestOption) (*OfferSubscription, error)

UpdateOfferSubscription: Update a subscribed offer.

func (*API) UpdateProjectSettings

func (s *API) UpdateProjectSettings(req *UpdateProjectSettingsRequest, opts ...scw.RequestOption) (*ProjectSettings, error)

UpdateProjectSettings: Update the project settings including periodic reports.

func (*API) UpdateWebhook

func (s *API) UpdateWebhook(req *UpdateWebhookRequest, opts ...scw.RequestOption) (*Webhook, error)

UpdateWebhook: Update a Webhook events type, SNS ARN or name.

func (*API) WaitForDomain

func (s *API) WaitForDomain(req *WaitForDomainRequest, opts ...scw.RequestOption) (*Domain, error)

WaitForDomain wait for the domain to be in a "terminal state" before returning. This function can be used to wait for a domain to be checked for example.

type Blocklist

type Blocklist struct {
	// ID: ID of the blocklist.
	ID string `json:"id"`

	// DomainID: domain ID linked to the blocklist.
	DomainID string `json:"domain_id"`

	// CreatedAt: date and time of the blocklist creation.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date and time of the blocklist's last update.
	UpdatedAt *time.Time `json:"updated_at"`

	// EndsAt: date and time when the blocklist ends. Empty if the blocklist has no end.
	EndsAt *time.Time `json:"ends_at"`

	// Email: email blocked by the blocklist.
	Email string `json:"email"`

	// Type: type of block for this email.
	// Default value: unknown_type
	Type BlocklistType `json:"type"`

	// Reason: reason to block this email.
	Reason string `json:"reason"`

	// Custom: true if this blocklist was created manually. False for an automatic Transactional Email blocklist.
	Custom bool `json:"custom"`
}

Blocklist: blocklist.

type BlocklistType

type BlocklistType string

func (BlocklistType) MarshalJSON

func (enum BlocklistType) MarshalJSON() ([]byte, error)

func (BlocklistType) String

func (enum BlocklistType) String() string

func (*BlocklistType) UnmarshalJSON

func (enum *BlocklistType) UnmarshalJSON(data []byte) error

func (BlocklistType) Values

func (enum BlocklistType) Values() []BlocklistType

type BulkCreateBlocklistsRequest

type BulkCreateBlocklistsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// DomainID: domain ID linked to the blocklist.
	DomainID string `json:"domain_id"`

	// Emails: email blocked by the blocklist.
	Emails []string `json:"emails"`

	// Type: type of blocklist.
	// Default value: unknown_type
	Type BlocklistType `json:"type"`

	// Reason: reason to block the email.
	Reason *string `json:"reason,omitempty"`
}

BulkCreateBlocklistsRequest: bulk create blocklists request.

type BulkCreateBlocklistsResponse

type BulkCreateBlocklistsResponse struct {
	// Blocklists: list of blocklist created.
	Blocklists []*Blocklist `json:"blocklists"`
}

BulkCreateBlocklistsResponse: bulk create blocklists response.

type CancelEmailRequest

type CancelEmailRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// EmailID: ID of the email to cancel.
	EmailID string `json:"-"`
}

CancelEmailRequest: cancel email request.

type CheckDomainRequest

type CheckDomainRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// DomainID: ID of the domain to check.
	DomainID string `json:"-"`
}

CheckDomainRequest: check domain request.

type CreateDomainRequest

type CreateDomainRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the project to which the domain belongs.
	ProjectID string `json:"project_id"`

	// DomainName: fully qualified domain dame.
	DomainName string `json:"domain_name"`

	// Deprecated: AcceptTos: deprecated. Accept Scaleway's Terms of Service.
	AcceptTos *bool `json:"accept_tos,omitempty"`

	// Autoconfig: activate auto-configuration of the domain's DNS zone.
	Autoconfig bool `json:"autoconfig"`
}

CreateDomainRequest: create domain request.

type CreateEmailRequest

type CreateEmailRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// From: sender information. Must be from a checked domain declared in the Project.
	From *CreateEmailRequestAddress `json:"from"`

	// To: an array of the primary recipient's information.
	To []*CreateEmailRequestAddress `json:"to"`

	// Cc: an array of the carbon copy recipient's information.
	Cc []*CreateEmailRequestAddress `json:"cc"`

	// Bcc: an array of the blind carbon copy recipient's information.
	Bcc []*CreateEmailRequestAddress `json:"bcc"`

	// Subject: subject of the email.
	Subject string `json:"subject"`

	// Text: text content.
	Text string `json:"text"`

	// HTML: HTML content.
	HTML string `json:"html"`

	// ProjectID: ID of the Project in which to create the email.
	ProjectID string `json:"project_id"`

	// Attachments: array of attachments.
	Attachments []*CreateEmailRequestAttachment `json:"attachments"`

	// SendBefore: maximum date to deliver the email.
	SendBefore *time.Time `json:"send_before,omitempty"`

	// AdditionalHeaders: array of additional headers as key-value.
	AdditionalHeaders []*CreateEmailRequestHeader `json:"additional_headers"`
}

CreateEmailRequest: create email request.

type CreateEmailRequestAddress

type CreateEmailRequestAddress struct {
	// Email: email address.
	Email string `json:"email"`

	// Name: (Optional) Name displayed.
	Name *string `json:"name"`
}

CreateEmailRequestAddress: create email request address.

type CreateEmailRequestAttachment

type CreateEmailRequestAttachment struct {
	// Name: filename of the attachment.
	Name string `json:"name"`

	// Type: mIME type of the attachment.
	Type string `json:"type"`

	// Content: content of the attachment encoded in base64.
	Content []byte `json:"content"`
}

CreateEmailRequestAttachment: create email request attachment.

type CreateEmailRequestHeader

type CreateEmailRequestHeader struct {
	// Key: email header key.
	Key string `json:"key"`

	// Value: email header value.
	Value string `json:"value"`
}

CreateEmailRequestHeader: create email request header.

type CreateEmailResponse

type CreateEmailResponse struct {
	// Emails: single page of emails matching the requested criteria.
	Emails []*Email `json:"emails"`
}

CreateEmailResponse: create email response.

type CreateWebhookRequest

type CreateWebhookRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// DomainID: ID of the Domain to watch for triggering events.
	DomainID string `json:"domain_id"`

	// ProjectID: ID of the project to which the Webhook belongs.
	ProjectID string `json:"project_id"`

	// Name: name of the Webhook.
	Name string `json:"name"`

	// EventTypes: list of event types that will trigger an event.
	EventTypes []WebhookEventType `json:"event_types"`

	// SnsArn: scaleway SNS ARN topic to push the events to.
	SnsArn string `json:"sns_arn"`
}

CreateWebhookRequest: create webhook request.

type DeleteBlocklistRequest

type DeleteBlocklistRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// BlocklistID: ID of the blocklist to delete.
	BlocklistID string `json:"-"`
}

DeleteBlocklistRequest: delete blocklist request.

type DeleteWebhookRequest

type DeleteWebhookRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// WebhookID: ID of the Webhook to delete.
	WebhookID string `json:"-"`
}

DeleteWebhookRequest: delete webhook request.

type Domain

type Domain struct {
	// ID: ID of the domain.
	ID string `json:"id"`

	// OrganizationID: ID of the domain's Organization.
	OrganizationID string `json:"organization_id"`

	// ProjectID: ID of the domain's Project.
	ProjectID string `json:"project_id"`

	// Name: domain name (example.com).
	Name string `json:"name"`

	// Status: status of the domain.
	// Default value: unknown
	Status DomainStatus `json:"status"`

	// CreatedAt: date and time of domain creation.
	CreatedAt *time.Time `json:"created_at"`

	// NextCheckAt: date and time of the next scheduled check.
	NextCheckAt *time.Time `json:"next_check_at"`

	// LastValidAt: date and time the domain was last valid.
	LastValidAt *time.Time `json:"last_valid_at"`

	// RevokedAt: date and time of the domain's deletion.
	RevokedAt *time.Time `json:"revoked_at"`

	// Deprecated: LastError: deprecated. Error message returned if the last check failed.
	LastError *string `json:"last_error,omitempty"`

	// SpfConfig: snippet of the SPF record to register in the DNS zone.
	SpfConfig string `json:"spf_config"`

	// DkimConfig: dKIM public key to record in the DNS zone.
	DkimConfig string `json:"dkim_config"`

	// Statistics: domain's statistics.
	Statistics *DomainStatistics `json:"statistics"`

	// Reputation: the domain's reputation is available when your domain is checked and has sent enough emails.
	Reputation *DomainReputation `json:"reputation"`

	// Records: list of records to configure to validate a domain.
	Records *DomainRecords `json:"records"`

	// Autoconfig: status of auto-configuration for the domain's DNS zone.
	Autoconfig bool `json:"autoconfig"`

	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"region"`
}

Domain: domain.

type DomainLastStatus

type DomainLastStatus struct {
	// DomainID: the ID of the domain.
	DomainID string `json:"domain_id"`

	// DomainName: the domain name (example.com).
	DomainName string `json:"domain_name"`

	// SpfRecord: the SPF record verification data.
	SpfRecord *DomainLastStatusSpfRecord `json:"spf_record"`

	// DkimRecord: the DKIM record verification data.
	DkimRecord *DomainLastStatusDkimRecord `json:"dkim_record"`

	// DmarcRecord: the DMARC record verification data.
	DmarcRecord *DomainLastStatusDmarcRecord `json:"dmarc_record"`

	// AutoconfigState: the verification state of domain auto-configuration.
	AutoconfigState *DomainLastStatusAutoconfigState `json:"autoconfig_state"`
}

DomainLastStatus: domain last status.

type DomainLastStatusAutoconfigState

type DomainLastStatusAutoconfigState struct {
	// Enabled: enable or disable the auto-configuration of domain DNS records.
	Enabled bool `json:"enabled"`

	// Autoconfigurable: whether the domain can be auto-configured or not.
	Autoconfigurable bool `json:"autoconfigurable"`

	// Reason: the reason that the domain cannot be auto-configurable.
	// Default value: unknown_reason
	Reason *DomainLastStatusAutoconfigStateReason `json:"reason"`
}

DomainLastStatusAutoconfigState: domain last status autoconfig state.

type DomainLastStatusAutoconfigStateReason

type DomainLastStatusAutoconfigStateReason string

func (DomainLastStatusAutoconfigStateReason) MarshalJSON

func (enum DomainLastStatusAutoconfigStateReason) MarshalJSON() ([]byte, error)

func (DomainLastStatusAutoconfigStateReason) String

func (*DomainLastStatusAutoconfigStateReason) UnmarshalJSON

func (enum *DomainLastStatusAutoconfigStateReason) UnmarshalJSON(data []byte) error

func (DomainLastStatusAutoconfigStateReason) Values

type DomainLastStatusDkimRecord

type DomainLastStatusDkimRecord struct {
	// Status: status of the DKIM record's configuration.
	// Default value: unknown_record_status
	Status DomainLastStatusRecordStatus `json:"status"`

	// LastValidAt: time and date the DKIM record was last valid.
	LastValidAt *time.Time `json:"last_valid_at"`

	// Error: an error text displays in case the record is not valid.
	Error *string `json:"error"`
}

DomainLastStatusDkimRecord: domain last status dkim record.

type DomainLastStatusDmarcRecord

type DomainLastStatusDmarcRecord struct {
	// Status: status of the DMARC record's configuration.
	// Default value: unknown_record_status
	Status DomainLastStatusRecordStatus `json:"status"`

	// LastValidAt: time and date the DMARC record was last valid.
	LastValidAt *time.Time `json:"last_valid_at"`

	// Error: an error text displays in case the record is not valid.
	Error *string `json:"error"`
}

DomainLastStatusDmarcRecord: domain last status dmarc record.

type DomainLastStatusRecordStatus

type DomainLastStatusRecordStatus string

func (DomainLastStatusRecordStatus) MarshalJSON

func (enum DomainLastStatusRecordStatus) MarshalJSON() ([]byte, error)

func (DomainLastStatusRecordStatus) String

func (enum DomainLastStatusRecordStatus) String() string

func (*DomainLastStatusRecordStatus) UnmarshalJSON

func (enum *DomainLastStatusRecordStatus) UnmarshalJSON(data []byte) error

func (DomainLastStatusRecordStatus) Values

type DomainLastStatusSpfRecord

type DomainLastStatusSpfRecord struct {
	// Status: status of the SPF record's configuration.
	// Default value: unknown_record_status
	Status DomainLastStatusRecordStatus `json:"status"`

	// LastValidAt: time and date the SPF record was last valid.
	LastValidAt *time.Time `json:"last_valid_at"`

	// Error: an error text displays in case the record is not valid.
	Error *string `json:"error"`
}

DomainLastStatusSpfRecord: domain last status spf record.

type DomainRecords

type DomainRecords struct {
	// Dmarc: dMARC TXT record specification.
	Dmarc *DomainRecordsDMARC `json:"dmarc"`
}

DomainRecords: domain records.

type DomainRecordsDMARC

type DomainRecordsDMARC struct {
	// Name: name of the DMARC TXT record.
	Name string `json:"name"`

	// Value: value of the DMARC TXT record.
	Value string `json:"value"`
}

DomainRecordsDMARC: domain records dmarc.

type DomainReputation

type DomainReputation struct {
	// Status: status of your domain's reputation.
	// Default value: unknown_status
	Status DomainReputationStatus `json:"status"`

	// Score: a range from 0 to 100 that determines your domain's reputation score. A score of `0` means a bad domain reputation and a score of `100` means an excellent domain reputation.
	Score uint32 `json:"score"`

	// ScoredAt: time and date the score was calculated.
	ScoredAt *time.Time `json:"scored_at"`

	// PreviousScore: the previously-calculated domain's reputation score.
	PreviousScore *uint32 `json:"previous_score"`

	// PreviousScoredAt: time and date the previous reputation score was calculated.
	PreviousScoredAt *time.Time `json:"previous_scored_at"`
}

DomainReputation: domain reputation.

type DomainReputationStatus

type DomainReputationStatus string

func (DomainReputationStatus) MarshalJSON

func (enum DomainReputationStatus) MarshalJSON() ([]byte, error)

func (DomainReputationStatus) String

func (enum DomainReputationStatus) String() string

func (*DomainReputationStatus) UnmarshalJSON

func (enum *DomainReputationStatus) UnmarshalJSON(data []byte) error

func (DomainReputationStatus) Values

type DomainStatistics

type DomainStatistics struct {
	TotalCount uint32 `json:"total_count"`

	SentCount uint32 `json:"sent_count"`

	FailedCount uint32 `json:"failed_count"`

	CanceledCount uint32 `json:"canceled_count"`
}

DomainStatistics: domain statistics.

type DomainStatus

type DomainStatus string

func (DomainStatus) MarshalJSON

func (enum DomainStatus) MarshalJSON() ([]byte, error)

func (DomainStatus) String

func (enum DomainStatus) String() string

func (*DomainStatus) UnmarshalJSON

func (enum *DomainStatus) UnmarshalJSON(data []byte) error

func (DomainStatus) Values

func (enum DomainStatus) Values() []DomainStatus

type Email

type Email struct {
	// ID: technical ID of the email.
	ID string `json:"id"`

	// MessageID: message ID of the email.
	MessageID string `json:"message_id"`

	// ProjectID: ID of the Project to which the email belongs.
	ProjectID string `json:"project_id"`

	// MailFrom: email address of the sender.
	MailFrom string `json:"mail_from"`

	// Deprecated: RcptTo: deprecated. Email address of the recipient.
	RcptTo *string `json:"rcpt_to,omitempty"`

	// MailRcpt: email address of the recipient.
	MailRcpt string `json:"mail_rcpt"`

	// RcptType: type of recipient.
	// Default value: unknown_rcpt_type
	RcptType EmailRcptType `json:"rcpt_type"`

	// Subject: subject of the email.
	Subject string `json:"subject"`

	// CreatedAt: creation date of the email object.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last update of the email object.
	UpdatedAt *time.Time `json:"updated_at"`

	// Status: status of the email.
	// Default value: unknown
	Status EmailStatus `json:"status"`

	// StatusDetails: additional status information.
	StatusDetails *string `json:"status_details"`

	// TryCount: number of attempts to send the email.
	TryCount uint32 `json:"try_count"`

	// LastTries: information about the last three attempts to send the email.
	LastTries []*EmailTry `json:"last_tries"`

	// Flags: flags categorize emails. They allow you to obtain more information about recurring errors, for example.
	Flags []EmailFlag `json:"flags"`
}

Email: email.

type EmailFlag

type EmailFlag string

func (EmailFlag) MarshalJSON

func (enum EmailFlag) MarshalJSON() ([]byte, error)

func (EmailFlag) String

func (enum EmailFlag) String() string

func (*EmailFlag) UnmarshalJSON

func (enum *EmailFlag) UnmarshalJSON(data []byte) error

func (EmailFlag) Values

func (enum EmailFlag) Values() []EmailFlag

type EmailRcptType

type EmailRcptType string

func (EmailRcptType) MarshalJSON

func (enum EmailRcptType) MarshalJSON() ([]byte, error)

func (EmailRcptType) String

func (enum EmailRcptType) String() string

func (*EmailRcptType) UnmarshalJSON

func (enum *EmailRcptType) UnmarshalJSON(data []byte) error

func (EmailRcptType) Values

func (enum EmailRcptType) Values() []EmailRcptType

type EmailStatus

type EmailStatus string

func (EmailStatus) MarshalJSON

func (enum EmailStatus) MarshalJSON() ([]byte, error)

func (EmailStatus) String

func (enum EmailStatus) String() string

func (*EmailStatus) UnmarshalJSON

func (enum *EmailStatus) UnmarshalJSON(data []byte) error

func (EmailStatus) Values

func (enum EmailStatus) Values() []EmailStatus

type EmailTry

type EmailTry struct {
	// Rank: rank number of this attempt to send the email.
	Rank uint32 `json:"rank"`

	// TriedAt: date of the attempt to send the email.
	TriedAt *time.Time `json:"tried_at"`

	// Code: the SMTP status code received after the attempt. 0 if the attempt did not reach an SMTP server.
	Code int32 `json:"code"`

	// Message: the SMTP message received. If the attempt did not reach an SMTP server, the message returned explains what happened.
	Message string `json:"message"`
}

EmailTry: email try.

type GetDomainLastStatusRequest

type GetDomainLastStatusRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// DomainID: ID of the domain to delete.
	DomainID string `json:"-"`
}

GetDomainLastStatusRequest: get domain last status request.

type GetDomainRequest

type GetDomainRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// DomainID: ID of the domain.
	DomainID string `json:"-"`
}

GetDomainRequest: get domain request.

type GetEmailRequest

type GetEmailRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// EmailID: ID of the email to retrieve.
	EmailID string `json:"-"`
}

GetEmailRequest: get email request.

type GetProjectConsumptionRequest

type GetProjectConsumptionRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the project.
	ProjectID string `json:"project_id"`
}

GetProjectConsumptionRequest: get project consumption request.

type GetProjectSettingsRequest

type GetProjectSettingsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the project.
	ProjectID string `json:"-"`
}

GetProjectSettingsRequest: get project settings request.

type GetStatisticsRequest

type GetStatisticsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: (Optional) Number of emails for this Project.
	ProjectID *string `json:"-"`

	// DomainID: (Optional) Number of emails sent from this domain (must be coherent with the `project_id` and the `organization_id`).
	DomainID *string `json:"-"`

	// Since: (Optional) Number of emails created after this date.
	Since *time.Time `json:"-"`

	// Until: (Optional) Number of emails created before this date.
	Until *time.Time `json:"-"`

	// MailFrom: (Optional) Number of emails sent with this sender's email address.
	MailFrom *string `json:"-"`
}

GetStatisticsRequest: get statistics request.

type GetWebhookRequest

type GetWebhookRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// WebhookID: ID of the Webhook to check.
	WebhookID string `json:"-"`
}

GetWebhookRequest: get webhook request.

type ListBlocklistsRequest

type ListBlocklistsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// OrderBy: (Optional) List blocklist corresponding to specific criteria.
	// Default value: created_at_desc
	OrderBy ListBlocklistsRequestOrderBy `json:"-"`

	// Page: (Optional) Requested page number. Value must be greater or equal to 1.
	Page *int32 `json:"-"`

	// PageSize: (Optional) Requested page size. Value must be between 1 and 100.
	PageSize *uint32 `json:"-"`

	// DomainID: (Optional) Filter by a domain ID.
	DomainID string `json:"-"`

	// Email: (Optional) Filter by an email address.
	Email *string `json:"-"`

	// Type: (Optional) Filter by a blocklist type.
	// Default value: unknown_type
	Type *BlocklistType `json:"-"`

	// Custom: (Optional) Filter by custom blocklist (true) or automatic Transactional Email blocklist (false).
	Custom *bool `json:"-"`
}

ListBlocklistsRequest: list blocklists request.

type ListBlocklistsRequestOrderBy

type ListBlocklistsRequestOrderBy string

func (ListBlocklistsRequestOrderBy) MarshalJSON

func (enum ListBlocklistsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListBlocklistsRequestOrderBy) String

func (enum ListBlocklistsRequestOrderBy) String() string

func (*ListBlocklistsRequestOrderBy) UnmarshalJSON

func (enum *ListBlocklistsRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListBlocklistsRequestOrderBy) Values

type ListBlocklistsResponse

type ListBlocklistsResponse struct {
	// TotalCount: number of blocklists matching the requested criteria.
	TotalCount uint64 `json:"total_count"`

	// Blocklists: single page of blocklists matching the requested criteria.
	Blocklists []*Blocklist `json:"blocklists"`
}

ListBlocklistsResponse: list blocklists response.

func (*ListBlocklistsResponse) UnsafeAppend

func (r *ListBlocklistsResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListBlocklistsResponse) UnsafeGetTotalCount

func (r *ListBlocklistsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListDomainsRequest

type ListDomainsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// Page: requested page number. Value must be greater or equal to 1.
	Page *int32 `json:"-"`

	// PageSize: requested page size. Value must be between 1 and 1000.
	PageSize *uint32 `json:"-"`

	// ProjectID: (Optional) ID of the Project in which to list the domains.
	ProjectID *string `json:"-"`

	// Status: (Optional) List domains under specific statuses.
	Status []DomainStatus `json:"-"`

	// OrganizationID: (Optional) ID of the Organization in which to list the domains.
	OrganizationID *string `json:"-"`

	// Name: (Optional) Names of the domains to list.
	Name *string `json:"-"`
}

ListDomainsRequest: list domains request.

type ListDomainsResponse

type ListDomainsResponse struct {
	// TotalCount: number of domains that match the request (without pagination).
	TotalCount uint32 `json:"total_count"`

	// Domains: single page of domains matching the requested criteria.
	Domains []*Domain `json:"domains"`
}

ListDomainsResponse: list domains response.

func (*ListDomainsResponse) UnsafeAppend

func (r *ListDomainsResponse) UnsafeAppend(res any) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListDomainsResponse) UnsafeGetTotalCount

func (r *ListDomainsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListEmailsRequest

type ListEmailsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`

	// ProjectID: (Optional) ID of the Project in which to list the emails.
	ProjectID *string `json:"-"`

	// DomainID: (Optional) ID of the domain for which to list the emails.
	DomainID *string `json:"-"`

	// MessageID: (Optional) ID of the message for which to list the emails.
	MessageID *string `json:"-"`

	// Since: (Optional) List emails created after this date.
	Since *time.Time `json:"-"`

	// Until: (Optional) List emails created before this date.
	Until *time.Time `json:"-"`

	// MailFrom: (Optional) List emails sent with this sender's email address.
	MailFrom *string `json:"-"`

	// Deprecated: MailTo: deprecated. List emails sent to this recipient's email address.
	MailTo *string `json:"-"`

	// MailRcpt: (Optional) List emails sent to this recipient's email address.
	MailRcpt *string `json:"-"`

	// Statuses: (Optional) List emails with any of these statuses.
	Statuses []EmailStatus `json:"-"`

	// Subject: (Optional) List emails with this subject.
	Subject *string `json:"-"`

	// Search: (Optional) List emails by searching to all fields.
	Search *string `json:"-"`

	// OrderBy: (Optional) List emails corresponding to specific criteria.
	// Default value: created_at_desc
	OrderBy ListEmailsRequestOrderBy `json:"-"`

	// Flags: (Optional) List emails containing only specific flags.
	Flags []EmailFlag `json:"-"`
}

ListEmailsRequest: list emails request.

type ListEmailsRequestOrderBy

type ListEmailsRequestOrderBy string

func (ListEmailsRequestOrderBy) MarshalJSON

func (enum ListEmailsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListEmailsRequestOrderBy) String

func (enum ListEmailsRequestOrderBy) String() string

func (*ListEmailsRequestOrderBy) UnmarshalJSON

func (enum *ListEmailsRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListEmailsRequestOrderBy) Values

type ListEmailsResponse

type ListEmailsResponse struct {
	// TotalCount: number of emails matching the requested criteria.
	TotalCount uint32 `json:"total_count"`

	// Emails: single page of emails matching the requested criteria.
	Emails []*Email `json:"emails"`
}

ListEmailsResponse: list emails response.

func (*ListEmailsResponse) UnsafeAppend

func (r *ListEmailsResponse) UnsafeAppend(res any) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListEmailsResponse) UnsafeGetTotalCount

func (r *ListEmailsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListOfferSubscriptionsRequest

type ListOfferSubscriptionsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`
}

ListOfferSubscriptionsRequest: list offer subscriptions request.

type ListOfferSubscriptionsResponse

type ListOfferSubscriptionsResponse struct {
	// TotalCount: number of offer-subscriptions matching the requested criteria.
	TotalCount uint64 `json:"total_count"`

	// OfferSubscriptions: single page of offer-subscriptions matching the requested criteria.
	OfferSubscriptions []*OfferSubscription `json:"offer_subscriptions"`
}

ListOfferSubscriptionsResponse: list offer subscriptions response.

func (*ListOfferSubscriptionsResponse) UnsafeAppend

func (r *ListOfferSubscriptionsResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListOfferSubscriptionsResponse) UnsafeGetTotalCount

func (r *ListOfferSubscriptionsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListOffersRequest

type ListOffersRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`
}

ListOffersRequest: list offers request.

type ListOffersResponse

type ListOffersResponse struct {
	// TotalCount: number of offers matching the requested criteria.
	TotalCount uint64 `json:"total_count"`

	// Offers: single page of offers matching the requested criteria.
	Offers []*Offer `json:"offers"`
}

ListOffersResponse: list offers response.

func (*ListOffersResponse) UnsafeAppend

func (r *ListOffersResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListOffersResponse) UnsafeGetTotalCount

func (r *ListOffersResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListPoolsRequest

type ListPoolsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// Page: requested page number. Value must be greater or equal to 1.
	Page *int32 `json:"-"`

	// PageSize: requested page size. Value must be between 1 and 1000.
	PageSize *uint32 `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"-"`
}

ListPoolsRequest: list pools request.

type ListPoolsResponse

type ListPoolsResponse struct {
	// TotalCount: number of pools matching the requested criteria.
	TotalCount uint64 `json:"total_count"`

	// Pools: single page of pools matching the requested criteria.
	Pools []*Pool `json:"pools"`
}

ListPoolsResponse: list pools response.

func (*ListPoolsResponse) UnsafeAppend

func (r *ListPoolsResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListPoolsResponse) UnsafeGetTotalCount

func (r *ListPoolsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListWebhookEventsRequest

type ListWebhookEventsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// WebhookID: ID of the Webhook linked to the events.
	WebhookID string `json:"-"`

	// OrderBy: (Optional) List Webhook events corresponding to specific criteria.
	// Default value: created_at_desc
	OrderBy ListWebhookEventsRequestOrderBy `json:"-"`

	// Page: requested page number. Value must be greater or equal to 1.
	Page *int32 `json:"-"`

	// PageSize: requested page size. Value must be between 1 and 100.
	PageSize *uint32 `json:"-"`

	// EmailID: ID of the email linked to the events.
	EmailID *string `json:"-"`

	// EventTypes: list of event types linked to the events.
	EventTypes []WebhookEventType `json:"-"`

	// Statuses: list of event statuses.
	Statuses []WebhookEventStatus `json:"-"`

	// ProjectID: ID of the webhook Project.
	ProjectID *string `json:"-"`

	// OrganizationID: ID of the webhook Organization.
	OrganizationID *string `json:"-"`

	// DomainID: ID of the domain to watch for triggering events.
	DomainID *string `json:"-"`
}

ListWebhookEventsRequest: list webhook events request.

type ListWebhookEventsRequestOrderBy

type ListWebhookEventsRequestOrderBy string

func (ListWebhookEventsRequestOrderBy) MarshalJSON

func (enum ListWebhookEventsRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListWebhookEventsRequestOrderBy) String

func (*ListWebhookEventsRequestOrderBy) UnmarshalJSON

func (enum *ListWebhookEventsRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListWebhookEventsRequestOrderBy) Values

type ListWebhookEventsResponse

type ListWebhookEventsResponse struct {
	// TotalCount: number of Webhook events matching the requested criteria.
	TotalCount uint64 `json:"total_count"`

	// WebhookEvents: single page of Webhook events matching the requested criteria.
	WebhookEvents []*WebhookEvent `json:"webhook_events"`
}

ListWebhookEventsResponse: list webhook events response.

func (*ListWebhookEventsResponse) UnsafeAppend

func (r *ListWebhookEventsResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListWebhookEventsResponse) UnsafeGetTotalCount

func (r *ListWebhookEventsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListWebhooksRequest

type ListWebhooksRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// OrderBy: (Optional) List Webhooks corresponding to specific criteria.
	// Default value: created_at_desc
	OrderBy ListWebhooksRequestOrderBy `json:"-"`

	// Page: (Optional) Requested page number. Value must be greater or equal to 1.
	Page *int32 `json:"-"`

	// PageSize: (Optional) Requested page size. Value must be between 1 and 100.
	PageSize *uint32 `json:"-"`

	// ProjectID: (Optional) ID of the Project for which to list the Webhooks.
	ProjectID *string `json:"-"`

	// OrganizationID: (Optional) ID of the Organization for which to list the Webhooks.
	OrganizationID *string `json:"-"`

	// DomainID: (Optional) ID of the Domain for which to list the Webhooks.
	DomainID *string `json:"-"`
}

ListWebhooksRequest: list webhooks request.

type ListWebhooksRequestOrderBy

type ListWebhooksRequestOrderBy string

func (ListWebhooksRequestOrderBy) MarshalJSON

func (enum ListWebhooksRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListWebhooksRequestOrderBy) String

func (enum ListWebhooksRequestOrderBy) String() string

func (*ListWebhooksRequestOrderBy) UnmarshalJSON

func (enum *ListWebhooksRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListWebhooksRequestOrderBy) Values

type ListWebhooksResponse

type ListWebhooksResponse struct {
	// TotalCount: number of Webhooks matching the requested criteria.
	TotalCount uint64 `json:"total_count"`

	// Webhooks: single page of Webhooks matching the requested criteria.
	Webhooks []*Webhook `json:"webhooks"`
}

ListWebhooksResponse: list webhooks response.

func (*ListWebhooksResponse) UnsafeAppend

func (r *ListWebhooksResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListWebhooksResponse) UnsafeGetTotalCount

func (r *ListWebhooksResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type Offer

type Offer struct {
	// Name: name of the offer.
	// Default value: unknown_name
	Name OfferName `json:"name"`

	// CreatedAt: date and time of the offer creation.
	CreatedAt *time.Time `json:"created_at"`

	// CommitmentPeriod: period of commitment.
	CommitmentPeriod *scw.Duration `json:"commitment_period"`

	// SLA: service Level Agreement percentage of the offer.
	SLA float32 `json:"sla"`

	// MaxDomains: max number of checked domains that can be associated with the offer.
	MaxDomains int32 `json:"max_domains"`

	// MaxDedicatedIPs: max number of dedicated IPs that can be associated with the offer.
	MaxDedicatedIPs int32 `json:"max_dedicated_ips"`

	// IncludedMonthlyEmails: number of emails included in the offer per month.
	IncludedMonthlyEmails int32 `json:"included_monthly_emails"`

	// MaxWebhooksPerDomain: max number of webhooks that can be associated with the offer.
	MaxWebhooksPerDomain int32 `json:"max_webhooks_per_domain"`

	// MaxCustomBlocklistsPerDomain: max number of active custom blocklists that can be associated with the offer.
	MaxCustomBlocklistsPerDomain int32 `json:"max_custom_blocklists_per_domain"`
}

Offer: offer.

type OfferName

type OfferName string

func (OfferName) MarshalJSON

func (enum OfferName) MarshalJSON() ([]byte, error)

func (OfferName) String

func (enum OfferName) String() string

func (*OfferName) UnmarshalJSON

func (enum *OfferName) UnmarshalJSON(data []byte) error

func (OfferName) Values

func (enum OfferName) Values() []OfferName

type OfferSubscription

type OfferSubscription struct {
	// OrganizationID: ID of the offer-subscription Organization.
	OrganizationID string `json:"organization_id"`

	// ProjectID: ID of the offer-subscription Project.
	ProjectID string `json:"project_id"`

	// OfferName: name of the offer associated with the Project.
	// Default value: unknown_name
	OfferName OfferName `json:"offer_name"`

	// SubscribedAt: date and time of the subscription.
	SubscribedAt *time.Time `json:"subscribed_at"`

	// CancellationAvailableAt: date and time of the end of the offer-subscription commitment.
	CancellationAvailableAt *time.Time `json:"cancellation_available_at"`

	// SLA: service Level Agreement percentage of the offer-subscription.
	SLA float32 `json:"sla"`

	// MaxDomains: max number of domains that can be associated with the offer-subscription for a particular Project.
	MaxDomains int32 `json:"max_domains"`

	// MaxDedicatedIPs: max number of dedicated IPs that can be associated with the offer-subscription for a particular Project.
	MaxDedicatedIPs int32 `json:"max_dedicated_ips"`

	// MaxWebhooksPerDomain: max number of webhooks that can be associated with the offer-subscription for a particular Project.
	MaxWebhooksPerDomain int32 `json:"max_webhooks_per_domain"`

	// MaxCustomBlocklistsPerDomain: max number of custom blocklists that can be associated with the offer-subscription for a particular Project.
	MaxCustomBlocklistsPerDomain int32 `json:"max_custom_blocklists_per_domain"`

	// IncludedMonthlyEmails: number of emails included in the offer-subscription per month.
	IncludedMonthlyEmails int32 `json:"included_monthly_emails"`
}

OfferSubscription: offer subscription.

type Pool

type Pool struct {
	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`

	// Status: status of the pool.
	// Default value: unknown_status
	Status PoolStatus `json:"status"`

	// Details: details of the pool.
	Details *string `json:"details"`

	// Zone: zone of the pool.
	Zone *scw.Zone `json:"zone"`

	// IPs: iPs of the pool.
	IPs []net.IP `json:"ips"`

	// Reverse: reverse hostname of all IPs of the pool.
	Reverse *string `json:"reverse"`
}

Pool: pool.

type PoolStatus

type PoolStatus string

func (PoolStatus) MarshalJSON

func (enum PoolStatus) MarshalJSON() ([]byte, error)

func (PoolStatus) String

func (enum PoolStatus) String() string

func (*PoolStatus) UnmarshalJSON

func (enum *PoolStatus) UnmarshalJSON(data []byte) error

func (PoolStatus) Values

func (enum PoolStatus) Values() []PoolStatus

type ProjectConsumption

type ProjectConsumption struct {
	// ProjectID: ID of the project.
	ProjectID string `json:"project_id"`

	// DomainsCount: number of domains in the project.
	DomainsCount int32 `json:"domains_count"`

	// DedicatedIPsCount: number of dedicated IP in the project.
	DedicatedIPsCount int32 `json:"dedicated_ips_count"`

	// MonthlyEmailsCount: number of emails sent during the current month in the project.
	MonthlyEmailsCount int32 `json:"monthly_emails_count"`

	// WebhooksCount: number of webhooks in the project.
	WebhooksCount int32 `json:"webhooks_count"`

	// CustomBlocklistsCount: number of custom blocklists in the project.
	CustomBlocklistsCount int32 `json:"custom_blocklists_count"`
}

ProjectConsumption: project consumption.

type ProjectSettings

type ProjectSettings struct {
	// PeriodicReport: information about your periodic report.
	PeriodicReport *ProjectSettingsPeriodicReport `json:"periodic_report"`
}

ProjectSettings: project settings.

type ProjectSettingsPeriodicReport

type ProjectSettingsPeriodicReport struct {
	// Enabled: enable or disable periodic report notifications.
	Enabled bool `json:"enabled"`

	// Frequency: at which frequency you receive periodic report notifications.
	// Default value: unknown_frequency
	Frequency ProjectSettingsPeriodicReportFrequency `json:"frequency"`

	// SendingHour: at which hour you receive periodic report notifications.
	SendingHour uint32 `json:"sending_hour"`

	// SendingDay: on which day you receive periodic report notifications (1-7 weekly, 1-28 monthly).
	SendingDay uint32 `json:"sending_day"`
}

ProjectSettingsPeriodicReport: project settings periodic report.

type ProjectSettingsPeriodicReportFrequency

type ProjectSettingsPeriodicReportFrequency string

func (ProjectSettingsPeriodicReportFrequency) MarshalJSON

func (enum ProjectSettingsPeriodicReportFrequency) MarshalJSON() ([]byte, error)

func (ProjectSettingsPeriodicReportFrequency) String

func (*ProjectSettingsPeriodicReportFrequency) UnmarshalJSON

func (enum *ProjectSettingsPeriodicReportFrequency) UnmarshalJSON(data []byte) error

func (ProjectSettingsPeriodicReportFrequency) Values

type RevokeDomainRequest

type RevokeDomainRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// DomainID: ID of the domain to delete.
	DomainID string `json:"-"`
}

RevokeDomainRequest: revoke domain request.

type Statistics

type Statistics struct {
	// TotalCount: total number of emails matching the requested criteria.
	TotalCount uint32 `json:"total_count"`

	// NewCount: number of emails still in the `new` transient state. This means emails received from the API but not yet processed.
	NewCount uint32 `json:"new_count"`

	// SendingCount: number of emails still in the `sending` transient state. This means emails received from the API but not yet in their final status.
	SendingCount uint32 `json:"sending_count"`

	// SentCount: number of emails in the final `sent` state. This means emails that have been delivered to the target mail system.
	SentCount uint32 `json:"sent_count"`

	// FailedCount: number of emails in the final `failed` state. This means emails that have been refused by the target mail system with a final error status.
	FailedCount uint32 `json:"failed_count"`

	// CanceledCount: number of emails in the final `canceled` state. This means emails that have been canceled upon request.
	CanceledCount uint32 `json:"canceled_count"`
}

Statistics: statistics.

type UpdateDomainRequest

type UpdateDomainRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// DomainID: ID of the domain to update.
	DomainID string `json:"-"`

	// Autoconfig: (Optional) If set to true, activate auto-configuration of the domain's DNS zone.
	Autoconfig *bool `json:"autoconfig,omitempty"`
}

UpdateDomainRequest: update domain request.

type UpdateOfferSubscriptionRequest

type UpdateOfferSubscriptionRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the Project.
	ProjectID string `json:"project_id"`

	// Name: name of the offer-subscription.
	// Default value: unknown_name
	Name OfferName `json:"name"`
}

UpdateOfferSubscriptionRequest: update offer subscription request.

type UpdateProjectSettingsRequest

type UpdateProjectSettingsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: ID of the project.
	ProjectID string `json:"-"`

	// PeriodicReport: periodic report update details - all fields are optional.
	PeriodicReport *UpdateProjectSettingsRequestUpdatePeriodicReport `json:"periodic_report,omitempty"`
}

UpdateProjectSettingsRequest: update project settings request.

type UpdateProjectSettingsRequestUpdatePeriodicReport

type UpdateProjectSettingsRequestUpdatePeriodicReport struct {
	// Enabled: (Optional) Enable or disable periodic report notifications.
	Enabled *bool `json:"enabled"`

	// Frequency: (Optional) Frequency at which you receive periodic report notifications.
	// Default value: unknown_frequency
	Frequency *ProjectSettingsPeriodicReportFrequency `json:"frequency"`

	// SendingHour: (Optional) Hour at which you receive periodic report notifications.
	SendingHour *uint32 `json:"sending_hour"`

	// SendingDay: (Optional) On which day you receive periodic report notifications (1-7 weekly, 1-28 monthly).
	SendingDay *uint32 `json:"sending_day"`
}

UpdateProjectSettingsRequestUpdatePeriodicReport: update project settings request update periodic report.

type UpdateWebhookRequest

type UpdateWebhookRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// WebhookID: ID of the Webhook to update.
	WebhookID string `json:"-"`

	// Name: name of the Webhook to update.
	Name *string `json:"name,omitempty"`

	// EventTypes: list of event types to update.
	EventTypes []WebhookEventType `json:"event_types"`

	// SnsArn: scaleway SNS ARN topic to update.
	SnsArn *string `json:"sns_arn,omitempty"`
}

UpdateWebhookRequest: update webhook request.

type WaitForDomainRequest

type WaitForDomainRequest struct {
	DomainID      string
	Region        scw.Region
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForDomainRequest is used by WaitForDomain method

type Webhook

type Webhook struct {
	// ID: ID of the Webhook.
	ID string `json:"id"`

	// DomainID: ID of the Domain to watch for triggering events.
	DomainID string `json:"domain_id"`

	// OrganizationID: ID of the Webhook Organization.
	OrganizationID string `json:"organization_id"`

	// ProjectID: ID of the Webhook Project.
	ProjectID string `json:"project_id"`

	// Name: name of the Webhook.
	Name string `json:"name"`

	// EventTypes: list of event types that will trigger a Webhook Event.
	EventTypes []WebhookEventType `json:"event_types"`

	// SnsArn: scaleway SNS ARN topic to push the events to.
	SnsArn string `json:"sns_arn"`

	// CreatedAt: date and time of the Webhook creation.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date and time of last Webhook updates.
	UpdatedAt *time.Time `json:"updated_at"`
}

Webhook: webhook.

type WebhookEvent

type WebhookEvent struct {
	// ID: ID of the Webhook Event.
	ID string `json:"id"`

	// WebhookID: ID of the Webhook that triggers the Event.
	WebhookID string `json:"webhook_id"`

	// OrganizationID: ID of the Webhook Event Organization.
	OrganizationID string `json:"organization_id"`

	// ProjectID: ID of the Webhook Event Project.
	ProjectID string `json:"project_id"`

	// DomainID: ID of the webhook event domain.
	DomainID string `json:"domain_id"`

	// Type: type of the Webhook Event.
	// Default value: unknown_type
	Type WebhookEventType `json:"type"`

	// Status: status of the Webhook Event.
	// Default value: unknown_status
	Status WebhookEventStatus `json:"status"`

	// Data: data sent to the Webhook destination.
	Data string `json:"data"`

	// CreatedAt: date and time of the Webhook Event creation.
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: date and time of last Webhook Event updates.
	UpdatedAt *time.Time `json:"updated_at"`

	// EmailID: optional Email ID if the event is triggered by an Email resource.
	EmailID *string `json:"email_id"`
}

WebhookEvent: webhook event.

type WebhookEventStatus

type WebhookEventStatus string

func (WebhookEventStatus) MarshalJSON

func (enum WebhookEventStatus) MarshalJSON() ([]byte, error)

func (WebhookEventStatus) String

func (enum WebhookEventStatus) String() string

func (*WebhookEventStatus) UnmarshalJSON

func (enum *WebhookEventStatus) UnmarshalJSON(data []byte) error

func (WebhookEventStatus) Values

func (enum WebhookEventStatus) Values() []WebhookEventStatus

type WebhookEventType

type WebhookEventType string

func (WebhookEventType) MarshalJSON

func (enum WebhookEventType) MarshalJSON() ([]byte, error)

func (WebhookEventType) String

func (enum WebhookEventType) String() string

func (*WebhookEventType) UnmarshalJSON

func (enum *WebhookEventType) UnmarshalJSON(data []byte) error

func (WebhookEventType) Values

func (enum WebhookEventType) Values() []WebhookEventType

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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