Versions in this module Expand all Collapse all v1 v1.0.5 May 11, 2023 Changes in this version type Client + func (c *Client) ActivateTemplateVersion(ctx context.Context, t TemplateVersion) (*TemplateVersion, error) v1.0.4 Jan 27, 2023 Changes in this version type Client + func (c *Client) CreateSSOUser(ctx context.Context, firstName, lastName, email string, scopes []string, ...) (*User, error) + func (c *Client) UpdateSSOUser(ctx context.Context, firstName, lastName, email string, scopes []string, ...) (*User, error) v1.0.3 Jan 25, 2023 v1.0.2 Dec 21, 2022 v1.0.1 Nov 21, 2022 Changes in this version + type APIError struct + func (e *APIError) MarshalJSON() ([]byte, error) + func (e *APIError) UnmarshalJSON(b []byte) error + func (e APIError) Detail() string + func (e APIError) Empty() bool + func (e APIError) Error() string type Client + BaseURL *url.URL + UserAgent string + func (c *Client) CreateUser(ctx context.Context, email string, scopes []string, isAdmin bool) (*User, error) + func (c *Client) DeleteUser(ctx context.Context, email string) (bool, error) + func (c *Client) GetPendingUserToken(ctx context.Context, email string) (string, error) + func (c *Client) GetUsernameByEmail(ctx context.Context, email string) (string, error) + func (c *Client) ReadUser(ctx context.Context, email string) (*User, error) + func (c *Client) UpdateUser(ctx context.Context, email string, scopes []string, isAdmin bool) (*User, error) + type PendingUser struct + Result []struct{ ... } + type Rate struct + Limit int + Remaining int + Reset time.Time + type Response struct + Cursor string + Rate Rate + type User struct + Address string + Address2 string + City string + Company string + Country string + Email string + FirstName string + IsAdmin bool + IsSSO bool + LastName string + Phone string + Scopes []string + State string + UserType string + Username string + Website string + Zip string + type Users struct + Result []User v1.0.0 Aug 25, 2022 Changes in this version + var ErrAPIKeyIDRequired = errors.New("an API Key ID is required") + var ErrBodyNotNil = errors.New("body must not be nil") + var ErrDomainAuthenticationIDRequired = errors.New("id for domain authentication is required") + var ErrEmailRequired = errors.New("an email is required") + var ErrFailedCreatingAPIKey = errors.New("failed creating apiKey") + var ErrFailedCreatingDomainAuthentication = errors.New("failed to create domain authentication") + var ErrFailedCreatingLinkBranding = errors.New("failed to create link branding") + var ErrFailedCreatingParseWebhook = errors.New("failed to create parse webhook") + var ErrFailedCreatingSSOCertificate = errors.New("failed to create SSO certificate") + var ErrFailedCreatingSSOIntegration = errors.New("failed to create SSO integration") + var ErrFailedCreatingSubUser = errors.New("failed creating subUser") + var ErrFailedCreatingUnsubscribeGroup = errors.New("failed to create unsubscribe list") + var ErrFailedDeletingAPIKey = errors.New("failed deleting apiKey") + var ErrFailedDeletingDomainAuthentication = errors.New("failed deleting domain authentication") + var ErrFailedDeletingLinkBranding = errors.New("failed to delete link branding") + var ErrFailedDeletingParseWebhook = errors.New("failed deleting parse webhook") + var ErrFailedDeletingSubUser = errors.New("failed deleting subUser") + var ErrFailedDeletingUnsubscribeGroup = errors.New("failed deleting unsubscribe list") + var ErrFailedPatchingEventWebhook = errors.New("failed to patch event webhook") + var ErrFailedUpdatingSSOCertificate = errors.New("failed to update SSO certificate") + var ErrFailedUpdatingSSOIntegration = errors.New("failed to update SSO integration") + var ErrHostnameRequired = errors.New("a hostname is required") + var ErrIPRequired = errors.New("at least one ip address is required") + var ErrLinkBrandingIDRequired = errors.New("link branding id is required") + var ErrNameRequired = errors.New("a name is required") + var ErrPasswordRequired = errors.New("a password is required") + var ErrSSOCertificateMissingField = errors.New("SSO certificate field is missing") + var ErrSSOIntegrationMissingField = errors.New("SSO integration field is missing") + var ErrSubUserPassword = errors.New("new password must be non empty") + var ErrTemplateIDRequired = errors.New("a template ID is required") + var ErrTemplateNameRequired = errors.New("a template name is required") + var ErrTemplateVersionIDRequired = errors.New("a template version ID is required") + var ErrTemplateVersionNameRequired = errors.New("a template version name is required") + var ErrTemplateVersionSubjectRequired = errors.New("a template version subject is required") + var ErrURLRequired = errors.New("a url is required") + var ErrUnsubscribeGroupIDRequired = errors.New("unsubscribe list id is required") + var ErrUsernameRequired = errors.New("a username is required") + func ParseDomainAuthentication(respBody string) (*DomainAuthentication, RequestError) + func RetryOnRateLimit(ctx context.Context, d *schema.ResourceData, ...) (interface{}, error) + type APIKey struct + APIKey string + ID string + Name string + Scopes []string + type Client struct + OnBehalfOf string + func NewClient(apiKey, host, onBehalfOf string) *Client + func (c *Client) ConfigureEventWebhookSigning(enabled bool) (*EventWebhookSigning, RequestError) + func (c *Client) CreateAPIKey(name string, scopes []string) (*APIKey, RequestError) + func (c *Client) CreateDomainAuthentication(domain string, subdomain string, ips []string, customSpf bool, isDefault bool, ...) (*DomainAuthentication, RequestError) + func (c *Client) CreateLinkBranding(domain string, subdomain string, isDefault bool) (*LinkBranding, RequestError) + func (c *Client) CreateParseWebhook(hostname string, url string, spamCheck bool, sendRaw bool) (*ParseWebhook, RequestError) + func (c *Client) CreateSubuser(username, email, password string, ips []string) (*SubUser, RequestError) + func (c *Client) CreateTemplate(name, generation string) (*Template, error) + func (c *Client) CreateTemplateVersion(t TemplateVersion) (*TemplateVersion, error) + func (c *Client) CreateUnsubscribeGroup(name string, description string, isDefault bool) (*UnsubscribeGroup, RequestError) + func (c *Client) DeleteAPIKey(id string) (bool, RequestError) + func (c *Client) DeleteDomainAuthentication(id string) (bool, RequestError) + func (c *Client) DeleteLinkBranding(id string) (bool, RequestError) + func (c *Client) DeleteParseWebhook(hostname string) (bool, RequestError) + func (c *Client) DeleteSubuser(username string) (bool, RequestError) + func (c *Client) DeleteTemplate(id string) (bool, error) + func (c *Client) DeleteTemplateVersion(templateID, id string) (bool, error) + func (c *Client) DeleteUnsubscribeGroup(id string) (bool, RequestError) + func (c *Client) Get(method rest.Method, endpoint string) (string, int, error) + func (c *Client) PatchEventWebhook(enabled bool, url string, groupResubscribe bool, delivered bool, ...) (*EventWebhook, RequestError) + func (c *Client) Post(method rest.Method, endpoint string, body interface{}) (string, int, error) + func (c *Client) ReadAPIKey(id string) (*APIKey, RequestError) + func (c *Client) ReadAPIKeys() ([]APIKey, RequestError) + func (c *Client) ReadDomainAuthentication(id string) (*DomainAuthentication, RequestError) + func (c *Client) ReadEventWebhook() (*EventWebhook, RequestError) + func (c *Client) ReadEventWebhookSigning() (*EventWebhookSigning, RequestError) + func (c *Client) ReadLinkBranding(id string) (*LinkBranding, RequestError) + func (c *Client) ReadParseWebhook(hostname string) (*ParseWebhook, RequestError) + func (c *Client) ReadSubUser(username string) ([]SubUser, RequestError) + func (c *Client) ReadTemplate(id string) (*Template, error) + func (c *Client) ReadTemplateVersion(templateID, id string) (*TemplateVersion, error) + func (c *Client) ReadTemplates(generation string) ([]Template, error) + func (c *Client) ReadUnsubscribeGroup(id string) (*UnsubscribeGroup, RequestError) + func (c *Client) ReadUnsubscribeGroups() ([]UnsubscribeGroup, RequestError) + func (c *Client) UpdateAPIKey(id, name string, scopes []string) (*APIKey, RequestError) + func (c *Client) UpdateDomainAuthentication(id string, isDefault bool, customSPF bool) (*DomainAuthentication, RequestError) + func (c *Client) UpdateLinkBranding(id string, isDefault bool) (*LinkBranding, RequestError) + func (c *Client) UpdateParseWebhook(hostname string, spamCheck bool, sendRaw bool) RequestError + func (c *Client) UpdateSubuser(username string, disabled bool) (bool, RequestError) + func (c *Client) UpdateSubuserIPs(username string, ips []string) RequestError + func (c *Client) UpdateSubuserPassword(username string, oldPassword string, newPassword string) RequestError + func (c *Client) UpdateTemplate(id, name string) (*Template, error) + func (c *Client) UpdateTemplateVersion(t TemplateVersion) (*TemplateVersion, error) + func (c *Client) UpdateUnsubscribeGroup(id string, name string, description string, isDefault bool) (*UnsubscribeGroup, RequestError) + func (c *Client) ValidateDomainAuthentication(id string) RequestError + func (c *Client) ValidateLinkBranding(id string) RequestError + func (c Client) CreateSSOCertificate(publicCertificate string, integrationID string) (*SSOCertificate, RequestError) + func (c Client) CreateSSOIntegration(name string, enabled bool, signInURL string, signOutURL string, ...) (*SSOIntegration, RequestError) + func (c Client) DeleteSSOCertificate(id string) (bool, RequestError) + func (c Client) DeleteSSOIntegration(id string) (bool, RequestError) + func (c Client) ListSSOCertificates() ([]*SSOCertificate, RequestError) + func (c Client) ListSSOIntegrations() ([]*SSOIntegration, RequestError) + func (c Client) ReadSSOCertificate(id string) (*SSOCertificate, RequestError) + func (c Client) ReadSSOIntegration(id string) (*SSOIntegration, RequestError) + func (c Client) UpdateSSOCertificate(id string, publicCertificate string, integrationID string) (*SSOCertificate, RequestError) + func (c Client) UpdateSSOIntegration(id string, name string, enabled bool, signInURL string, signOutURL string, ...) (*SSOIntegration, RequestError) + type DomainAuthentication struct + AutomaticSecurity bool + CustomDKIMSelector string + CustomSPF bool + DNS DomainAuthenticationDNS + Domain string + ID int32 + IPs []string + IsDefault bool + Legacy bool + Subdomain string + UserID int32 + Username string + Valid bool + type DomainAuthenticationDNS struct + DKIM DomainAuthenticationDNSValue + DKIM1 DomainAuthenticationDNSValue + DKIM2 DomainAuthenticationDNSValue + MailCNAME DomainAuthenticationDNSValue + MailServer DomainAuthenticationDNSValue + SubDomainSPF DomainAuthenticationDNSValue + type DomainAuthenticationDNSValue struct + Data string + Host string + Type string + Valid bool + type EventWebhook struct + Bounce bool + Click bool + Deferred bool + Delivered bool + Dropped bool + Enabled bool + GroupResubscribe bool + GroupUnsubscribe bool + OAuthClientID string + OAuthClientSecret string + OAuthTokenURL string + Open bool + Processed bool + SpamReport bool + URL string + Unsubscribe bool + type EventWebhookSigning struct + Enabled bool + PublicKey string + type LinkBranding struct + DNS LinkBrandingDNS + Domain string + ID int32 + IsDefault bool + Legacy bool + Subdomain string + UserID int32 + Username string + Valid bool + type LinkBrandingDNS struct + DomainCNAME LinkBrandingDNSValue + OwnerCNAME LinkBrandingDNSValue + type LinkBrandingDNSValue struct + Data string + Host string + Type string + Valid bool + type ParseWebhook struct + Hostname string + SendRaw bool + SpamCheck bool + URL string + type RequestError struct + Err error + StatusCode int + type SSOCertificate struct + ID int32 + IntegrationID string + PublicCertificate string + type SSOIntegration struct + AudienceURL string + CompletedIntegration bool + Enabled bool + EntityID string + ID string + Name string + SignInURL string + SignOutURL string + SingleSignOnURL string + type SubUser struct + AuthorizationToken string + ConfirmPassword string + CreditAllocation creditAllocation + Disabled bool + Email string + ID int + IPs []string + Password string + SignupSessionToken string + UserID int + UserName string + type Template struct + Generation string + ID string + Name string + UpdatedAt string + Versions []TemplateVersion + Warnings []string + type TemplateVersion struct + Active int + Editor string + GeneratePlainContent bool + HTMLContent string + ID string + Name string + PlainContent string + Subject string + TemplateID string + TestData string + ThumbnailURL string + UpdatedAt string + Warnings []string + type Templates struct + Result []Template + type UnsubscribeGroup struct + Description string + ID int32 + IsDefault bool + Name string + Unsubscribes int32 + type UpdateSubUserPassword struct + NewPassword string + OldPassword string