Documentation ¶
Index ¶
- Constants
- type AccountDetails
- type AccountDetailsWrap
- type Action
- type Actions
- type AddyOperator
- type Alias
- type AliasFormat
- type AliasNewArgs
- type AliasRecipientArgs
- type AliasSortCond
- type AliasUpdateArgs
- type AliasWrap
- type AliasesGetArgs
- type AliasesLinks
- type AliasesMeta
- type AliasesMetaLinks
- type AliasesWrap
- type AppVersion
- type Bulk
- type BulkWrap
- type Client
- func (c *Client) AccountGetDetails() (*AccountDetailsWrap, error)
- func (c *Client) AliasDelete(id string) error
- func (c *Client) AliasDisable(id string) error
- func (c *Client) AliasEnable(id string) (*AliasWrap, error)
- func (c *Client) AliasForget(id string) error
- func (c *Client) AliasGet(id string) (*AliasWrap, error)
- func (c *Client) AliasNew(params *AliasNewArgs) (*AliasWrap, error)
- func (c *Client) AliasRestore(id string) (*AliasWrap, error)
- func (c *Client) AliasUpdRecipients(data *AliasRecipientArgs) (*AliasWrap, error)
- func (c *Client) AliasUpdate(id string, data *AliasUpdateArgs) (*AliasWrap, error)
- func (c *Client) AliasesGet(params *AliasesGetArgs) (*AliasesWrap, error)
- func (c *Client) AppGetVersion() (*AppVersion, error)
- func (c *Client) BulkAliasesDelete(ids []string) (*BulkWrap, error)
- func (c *Client) BulkAliasesDisable(ids []string) (*BulkWrap, error)
- func (c *Client) BulkAliasesEnable(ids []string) (*BulkWrap, error)
- func (c *Client) BulkAliasesForget(ids []string) (*BulkWrap, error)
- func (c *Client) BulkAliasesGet(ids []string) (*AliasesWrap, error)
- func (c *Client) BulkAliasesRestore(ids []string) (*BulkWrap, error)
- func (c *Client) BulkAliasesUpdRecipients(aliasIDs, recipientIDs []string) (*BulkWrap, error)
- func (c *Client) DomainDelete(id string) error
- func (c *Client) DomainDisabCatchAll(id string) error
- func (c *Client) DomainDisable(id string) error
- func (c *Client) DomainEnabCatchAll(id string) (*DomainWrap, error)
- func (c *Client) DomainEnable(id string) (*DomainWrap, error)
- func (c *Client) DomainGet(id string) (*DomainWrap, error)
- func (c *Client) DomainGetOpts() (*DomainOptions, error)
- func (c *Client) DomainNew(domain string) (*DomainWrap, error)
- func (c *Client) DomainUpdDefRecipient(id, recipient string) (*DomainWrap, error)
- func (c *Client) DomainUpdate(id string, data *DomainUpdateArgs) (*DomainWrap, error)
- func (c *Client) DomainsGet() (*DomainsWrap, error)
- func (c *Client) FailedDeliveriesGet() (*FailedDeliveriesWrap, error)
- func (c *Client) FailedDeliveryDel(id string) error
- func (c *Client) FailedDeliveryGet(id string) (*FailedDeliveryWrap, error)
- func (c *Client) RecipientAddPubKey(id, pubKey string) (*RecipientWrap, error)
- func (c *Client) RecipientDelPubKey(id string) error
- func (c *Client) RecipientDelete(id string) error
- func (c *Client) RecipientDisabEnc(id string) error
- func (c *Client) RecipientDisabInlEnc(id string) error
- func (c *Client) RecipientDisabProtHeads(id string) error
- func (c *Client) RecipientDisabReplSend(id string) error
- func (c *Client) RecipientEnabEnc(id string) (*RecipientWrap, error)
- func (c *Client) RecipientEnabEncInl(id string) (*RecipientWrap, error)
- func (c *Client) RecipientEnabProtHead(id string) (*RecipientWrap, error)
- func (c *Client) RecipientEnabReplSend(id string) (*RecipientWrap, error)
- func (c *Client) RecipientGet(id string) (*RecipientWrap, error)
- func (c *Client) RecipientNew(email string) (*RecipientWrap, error)
- func (c *Client) RecipientResendEmail(id string) error
- func (c *Client) RecipientsGet(params *RecipientsGetArgs) (*RecipientsWrap, error)
- func (c *Client) RuleDelete(id string) error
- func (c *Client) RuleDisable(id string) error
- func (c *Client) RuleEnable(id string) (*RuleWrap, error)
- func (c *Client) RuleGet(id string) (*RuleWrap, error)
- func (c *Client) RuleNew(data *RuleNewParams) (*RuleWrap, error)
- func (c *Client) RuleUpdate(id string, data *RuleUpdateArgs) (*RuleWrap, error)
- func (c *Client) RulesGet() (*RulesWrap, error)
- func (c *Client) RulesUpdOrder(ids []string) error
- func (c *Client) TokenGetAPIDetails() (*TokenAPIDetails, error)
- func (c *Client) UserAllowLogin(id string) (*UserWrap, error)
- func (c *Client) UserDelete(id string) error
- func (c *Client) UserDisabCatchAll(id string) error
- func (c *Client) UserDisable(id string) error
- func (c *Client) UserDisallowLogin(id string) error
- func (c *Client) UserEnabCatchAll(id string) (*UserWrap, error)
- func (c *Client) UserEnable(id string) (*UserWrap, error)
- func (c *Client) UserGet(id string) (*UserWrap, error)
- func (c *Client) UserNew(username string) (*UserWrap, error)
- func (c *Client) UserUpdRecipient(id, recipent string) (*UserWrap, error)
- func (c *Client) UserUpdate(id string, data *UserUpdateArgs) (*UserWrap, error)
- func (c *Client) UsersGet() (*UsersWrap, error)
- type Condition
- type Conditions
- type Domain
- type DomainOptions
- type DomainUpdateArgs
- type DomainWrap
- type DomainsWrap
- type FailedDeliveriesWrap
- type FailedDelivery
- type FailedDeliveryWrap
- type IDGeneric
- type IDsGeneric
- type Recipient
- type RecipientWrap
- type RecipientsGetArgs
- type RecipientsWrap
- type Rule
- type RuleNewParams
- type RuleUpdateArgs
- type RuleWrap
- type RulesWrap
- type TokenAPIDetails
- type UnixTime
- type User
- type UserUpdateArgs
- type UserWrap
- type UsersWrap
Constants ¶
const ( AliasSortLocalPart AliasSortCond = "local_part" AliasSortDomain AliasSortCond = "domain" AliasSortEmail AliasSortCond = "email" AliasSortEmailsFwd AliasSortCond = "emails_forwarded" AliasSortEmailsBlkd AliasSortCond = "emails_blocked" AliasSortEmailsRepl AliasSortCond = "emails_replied" AliasSortEmailsSent AliasSortCond = "emails_sent" AliasSortActive AliasSortCond = "active" AliasSortCreatedAt AliasSortCond = "created_at" AliasSortUpdatedAt AliasSortCond = "updated_at" AliasSortDeletedAt AliasSortCond = "deleted_at" AliasFmtRndChars AliasFormat = "random_characters" AliasFmtUUID AliasFormat = "uuid" AliasFmtRndWords AliasFormat = "random_words" AliasFmtCustom AliasFormat = "custom" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountDetails ¶
type AccountDetails struct { ID string `json:"id"` Username string `json:"username"` FromName string `json:"from_name"` EmailSubject string `json:"email_subject"` BannerLocation string `json:"banner_location"` Bandwidth uint `json:"bandwidth"` UsernameCount uint `json:"username_count"` UsernameLimit uint `json:"username_limit"` DefaultRecipientID string `json:"default_recipient_id"` DefaultAliasDomain string `json:"default_alias_domain"` DefaultAliasFormat string `json:"default_alias_format"` Subscription string `json:"subscription"` SubscriptionEndsAt *UnixTime `json:"subscription_ends_at"` BandwidthLimit uint `json:"bandwidth_limit"` RecipientCount uint `json:"recipient_count"` RecipientLimit uint `json:"recipient_limit"` ActiveDomainCount uint `json:"active_domain_count"` ActiveDomainLimit uint `json:"active_domain_limit"` TotalEmailsForwarded uint `json:"total_emails_forwarded"` TotalEmailsBlocked uint `json:"total_emails_blocked"` TotalEmailsReplied uint `json:"total_emails_replied"` TotalEmailsSent uint `json:"total_emails_sent"` CreatedAt UnixTime `json:"created_at"` UpdatedAt *UnixTime `json:"updated_at"` }
type AccountDetailsWrap ¶
type AccountDetailsWrap struct {
Data AccountDetails `json:"data"`
}
type AddyOperator ¶
type AddyOperator string
const ( AddyANDCond AddyOperator = "AND" AddyORCond AddyOperator = "OR" )
type Alias ¶
type Alias struct { ID string `json:"id"` UserID string `json:"user_id"` AliasableID string `json:"aliasable_id"` AliasableType string `json:"aliasable_type"` LocalPart string `json:"local_part"` Extension string `json:"extension"` Domain string `json:"domain"` Email string `json:"email"` Active bool `json:"active"` Description string `json:"description"` EmailsForwarded uint `json:"emails_forwarded"` EmailsBlocked uint `json:"emails_blocked"` EmailsReplied uint `json:"emails_replied"` EmailsSent uint `json:"emails_sent"` Recipients []Recipient `json:"recipients"` CreatedAt UnixTime `json:"created_at"` UpdatedAt *UnixTime `json:"updated_at"` DeletedAt *UnixTime `json:"deleted_at"` }
type AliasFormat ¶
type AliasFormat string
type AliasNewArgs ¶
type AliasNewArgs struct { // The domain of the alias. Domain string `json:"domain"` // The description of the alias Desc string `json:"description,omitempty"` // The chosen format for the alias. Format AliasFormat `json:"format,omitempty"` // The chosen local part for the alias (only required if you have the // format as custom) LocalPart string `json:"local_part,omitempty"` // An array of recipient ids to add (the default recipient will be used // if none provided) Recipients []string `json:"recipient_ids,omitempty"` }
type AliasRecipientArgs ¶
type AliasSortCond ¶
type AliasSortCond string
type AliasUpdateArgs ¶
type AliasesGetArgs ¶
type AliasesGetArgs struct { // Include deleted or only deleted: // Filter[deleted] = with | only // // Choose to return active or unactive aliases: // Filter[active] = true | false // // Search aliases by email and description. // Filter[search] = <search_string> Filter map[string]string // Paginate the alias results, default 100, min 1 max 100. PageSize uint // Paginate the alias results; what page number do you want? PageNumber uint // Sort aliases based on this given condition. SortCond AliasSortCond // Descending sort? SortDesc bool // Return aliases with recipients? WithRecipients bool // Return aliases using the recipient with the specified ID. Recipient string // Return aliases using the custom domain with the specified ID. Domain string // Return aliases using the username with the specified ID. Username string }
type AliasesLinks ¶
type AliasesMeta ¶
type AliasesMetaLinks ¶
type AliasesWrap ¶
type AliasesWrap struct { Data []Alias `json:"data"` Links AliasesLinks `json:"links"` Meta AliasesMeta `json:"meta"` }
type AppVersion ¶
type Client ¶
func NewCustomClient ¶
Initialize a new API client.
func (*Client) AccountGetDetails ¶
func (c *Client) AccountGetDetails() (*AccountDetailsWrap, error)
https://app.addy.io/docs/#account-details-GETapi-v1-account-details
func (*Client) AliasDelete ¶
func (*Client) AliasEnable ¶
func (*Client) AliasUpdRecipients ¶
func (c *Client) AliasUpdRecipients(data *AliasRecipientArgs) (*AliasWrap, error)
https://app.addy.io/docs/#aliases-POSTapi-v1-alias-recipients
func (*Client) AliasUpdate ¶
func (c *Client) AliasUpdate(id string, data *AliasUpdateArgs) (*AliasWrap, error)
func (*Client) AliasesGet ¶
func (c *Client) AliasesGet(params *AliasesGetArgs) (*AliasesWrap, error)
func (*Client) AppGetVersion ¶
func (c *Client) AppGetVersion() (*AppVersion, error)
func (*Client) BulkAliasesDelete ¶
https://app.addy.io/docs/#alias-bulk-actions-POSTapi-v1-aliases-delete-bulk
func (*Client) BulkAliasesDisable ¶
https://app.addy.io/docs/#alias-bulk-actions-POSTapi-v1-aliases-deactivate-bulk
func (*Client) BulkAliasesEnable ¶
https://app.addy.io/docs/#alias-bulk-actions-POSTapi-v1-aliases-activate-bulk
func (*Client) BulkAliasesForget ¶
https://app.addy.io/docs/#alias-bulk-actions-POSTapi-v1-aliases-forget-bulk
func (*Client) BulkAliasesGet ¶
func (c *Client) BulkAliasesGet(ids []string) (*AliasesWrap, error)
https://app.addy.io/docs/#alias-bulk-actions-POSTapi-v1-aliases-get-bulk
func (*Client) BulkAliasesRestore ¶
https://app.addy.io/docs/#alias-bulk-actions-POSTapi-v1-aliases-restore-bulk
func (*Client) BulkAliasesUpdRecipients ¶
https://app.addy.io/docs/#alias-bulk-actions-POSTapi-v1-aliases-recipients-bulk
func (*Client) DomainDelete ¶
func (*Client) DomainDisabCatchAll ¶
https://app.addy.io/docs/#domains-DELETEapi-v1-catch-all-domains--id-
func (*Client) DomainEnabCatchAll ¶
func (c *Client) DomainEnabCatchAll(id string) (*DomainWrap, error)
https://app.addy.io/docs/#domains-POSTapi-v1-catch-all-domains
func (*Client) DomainEnable ¶
func (c *Client) DomainEnable(id string) (*DomainWrap, error)
func (*Client) DomainGetOpts ¶
func (c *Client) DomainGetOpts() (*DomainOptions, error)
func (*Client) DomainUpdDefRecipient ¶
func (c *Client) DomainUpdDefRecipient(id, recipient string) (*DomainWrap, error)
https://app.addy.io/docs/#domains-PATCHapi-v1-domains--id--default-recipient
func (*Client) DomainUpdate ¶
func (c *Client) DomainUpdate(id string, data *DomainUpdateArgs) (*DomainWrap, error)
func (*Client) DomainsGet ¶
func (c *Client) DomainsGet() (*DomainsWrap, error)
func (*Client) FailedDeliveriesGet ¶
func (c *Client) FailedDeliveriesGet() (*FailedDeliveriesWrap, error)
https://app.addy.io/docs/#failed-deliveries-GETapi-v1-failed-deliveries
func (*Client) FailedDeliveryDel ¶
https://app.addy.io/docs/#failed-deliveries-DELETEapi-v1-failed-deliveries--id-
func (*Client) FailedDeliveryGet ¶
func (c *Client) FailedDeliveryGet(id string) (*FailedDeliveryWrap, error)
https://app.addy.io/docs/#failed-deliveries-GETapi-v1-failed-deliveries--id-
func (*Client) RecipientAddPubKey ¶
func (c *Client) RecipientAddPubKey(id, pubKey string) (*RecipientWrap, error)
https://app.addy.io/docs/#recipients-PATCHapi-v1-recipient-keys--id-
func (*Client) RecipientDelPubKey ¶
https://app.addy.io/docs/#recipients-DELETEapi-v1-recipient-keys--id-
func (*Client) RecipientDisabEnc ¶
https://app.addy.io/docs/#recipients-DELETEapi-v1-encrypted-recipients--id-
func (*Client) RecipientDisabInlEnc ¶
https://app.addy.io/docs/#recipients-DELETEapi-v1-inline-encrypted-recipients--id-
func (*Client) RecipientDisabProtHeads ¶
https://app.addy.io/docs/#recipients-DELETEapi-v1-protected-headers-recipients--id-
func (*Client) RecipientDisabReplSend ¶
https://app.addy.io/docs/#recipients-DELETEapi-v1-allowed-recipients--id-
func (*Client) RecipientEnabEnc ¶
func (c *Client) RecipientEnabEnc(id string) (*RecipientWrap, error)
https://app.addy.io/docs/#recipients-POSTapi-v1-encrypted-recipients
func (*Client) RecipientEnabEncInl ¶
func (c *Client) RecipientEnabEncInl(id string) (*RecipientWrap, error)
https://app.addy.io/docs/#recipients-POSTapi-v1-inline-encrypted-recipients
func (*Client) RecipientEnabProtHead ¶
func (c *Client) RecipientEnabProtHead(id string) (*RecipientWrap, error)
https://app.addy.io/docs/#recipients-POSTapi-v1-protected-headers-recipients
func (*Client) RecipientEnabReplSend ¶
func (c *Client) RecipientEnabReplSend(id string) (*RecipientWrap, error)
https://app.addy.io/docs/#recipients-POSTapi-v1-allowed-recipients
func (*Client) RecipientGet ¶
func (c *Client) RecipientGet(id string) (*RecipientWrap, error)
https://app.addy.io/docs/#recipients-GETapi-v1-recipients--id-
func (*Client) RecipientNew ¶
func (c *Client) RecipientNew(email string) (*RecipientWrap, error)
func (*Client) RecipientResendEmail ¶
https://app.addy.io/docs/#recipients-POSTapi-v1-recipients-email-resend
func (*Client) RecipientsGet ¶
func (c *Client) RecipientsGet(params *RecipientsGetArgs) (*RecipientsWrap, error)
func (*Client) RuleDelete ¶
func (*Client) RuleEnable ¶
func (*Client) RuleUpdate ¶
func (c *Client) RuleUpdate(id string, data *RuleUpdateArgs) (*RuleWrap, error)
func (*Client) RulesUpdOrder ¶
func (*Client) TokenGetAPIDetails ¶
func (c *Client) TokenGetAPIDetails() (*TokenAPIDetails, error)
https://app.addy.io/docs/#api-token-GETapi-v1-api-token-details
func (*Client) UserDisabCatchAll ¶
https://app.addy.io/docs/#usernames-DELETEapi-v1-catch-all-usernames--id-
func (*Client) UserDisallowLogin ¶
https://app.addy.io/docs/#usernames-DELETEapi-v1-catch-all-usernames--id-
func (*Client) UserEnabCatchAll ¶
https://app.addy.io/docs/#usernames-POSTapi-v1-catch-all-usernames
func (*Client) UserGet ¶
https://app.addy.io/docs/#usernames-GETapi-v1-usernames--id-
func (*Client) UserUpdRecipient ¶
https://app.addy.io/docs/#usernames-PATCHapi-v1-usernames--id--default-recipient
func (*Client) UserUpdate ¶
func (c *Client) UserUpdate(id string, data *UserUpdateArgs) (*UserWrap, error)
https://app.addy.io/docs/#usernames-PATCHapi-v1-usernames--id-
type Conditions ¶
type Domain ¶
type Domain struct { ID string `json:"id"` UserID string `json:"user_id"` Domain string `json:"domain"` Description string `json:"description"` Aliases []Alias `json:"aliases"` DefaultRecipient Recipient `json:"default_recipient"` Active bool `json:"active"` CatchAll bool `json:"catch_all"` DomainVerifiedAt *UnixTime `json:"domain_verified_at"` DomainMxValidatedAt *UnixTime `json:"domain_mx_validated_at"` DomainSendingVerifiedAt *UnixTime `json:"domain_sending_verified_at"` CreatedAt UnixTime `json:"created_at"` UpdatedAt *UnixTime `json:"updated_at"` }
type DomainOptions ¶
type DomainUpdateArgs ¶
type DomainWrap ¶
type DomainWrap struct {
Data Domain `json:"data"`
}
type DomainsWrap ¶
type DomainsWrap struct {
Data []Domain `json:"data"`
}
type FailedDeliveriesWrap ¶
type FailedDeliveriesWrap struct {
Data []FailedDelivery `json:"data"`
}
type FailedDelivery ¶
type FailedDelivery struct { ID string `json:"id"` UserID string `json:"user_id"` RecipientID string `json:"recipient_id"` RecipientEmail string `json:"recipient_email"` AliasID string `json:"alias_id"` AliasEmail string `json:"alias_email"` BounceType string `json:"bounce_type"` RemoteMta string `json:"remote_mta"` Sender string `json:"sender"` EmailType string `json:"email_type"` Status string `json:"status"` Code string `json:"code"` AttemptedAt UnixTime `json:"attempted_at"` CreatedAt *UnixTime `json:"created_at"` UpdatedAt *UnixTime `json:"updated_at"` }
type FailedDeliveryWrap ¶
type FailedDeliveryWrap struct {
Data FailedDelivery `json:"data"`
}
type IDGeneric ¶
type IDGeneric struct {
ID string `json:"id"`
}
Multiple methods require either ID or an array of IDs as arguments.
type IDsGeneric ¶
type IDsGeneric struct {
IDs []string `json:"ids"`
}
type Recipient ¶
type Recipient struct { ID string `json:"id"` UserID string `json:"user_id"` Email string `json:"email"` CanReplySend bool `json:"can_reply_send"` ShouldEncrypt bool `json:"should_encrypt"` InlineEncryption bool `json:"inline_encryption"` ProtectedHeaders bool `json:"protected_headers"` Fingerprint string `json:"fingerprint"` EmailVerifiedAt *UnixTime `json:"email_verified_at"` Aliases []Alias `json:"aliases"` CreatedAt UnixTime `json:"created_at"` UpdatedAt *UnixTime `json:"updated_at"` }
type RecipientWrap ¶
type RecipientWrap struct {
Data Recipient `json:"data"`
}
type RecipientsGetArgs ¶
type RecipientsWrap ¶
type RecipientsWrap struct {
Data []Recipient `json:"data"`
}
type Rule ¶
type Rule struct { ID string `json:"id"` UserID string `json:"user_id"` Name string `json:"name"` Order int `json:"order"` Conditions []Conditions `json:"conditions"` Actions []Actions `json:"actions"` Operator string `json:"operator"` Forwards bool `json:"forwards"` Replies bool `json:"replies"` Sends bool `json:"sends"` Active bool `json:"active"` CreatedAt UnixTime `json:"created_at"` UpdatedAt *UnixTime `json:"updated_at"` }
type RuleNewParams ¶
type RuleUpdateArgs ¶
type RuleUpdateArgs struct { Name string `json:"name"` Conditions []Condition `json:"conditions"` Actions []Action `json:"actions"` Operator AddyOperator `json:"operator,omitempty"` Forwards bool `json:"forwards,omitempty"` Replies bool `json:"replies,omitempty"` Sends bool `json:"sends,omitempty"` }
type TokenAPIDetails ¶
type User ¶
type User struct { ID string `json:"id"` UserID string `json:"user_id"` Username string `json:"username"` Description string `json:"description"` Aliases []Alias `json:"aliases"` DefaultRecipient string `json:"default_recipient"` Active bool `json:"active"` CatchAll bool `json:"catch_all"` CanLogin bool `json:"can_login"` CreatedAt UnixTime `json:"created_at"` UpdatedAt *UnixTime `json:"updated_at"` }