Documentation ¶
Index ¶
- Constants
- type APIError
- type Client
- func (client *Client) CreateDomain(ctx context.Context, input CreateDomainInput) (res Domain, err error)
- func (client *Client) DeleteDomain(ctx context.Context, domain string) (err error)
- func (client *Client) GetDomain(ctx context.Context, domain string) (res DomainResponse, err error)
- func (client *Client) UpdateDomainDKIMSelector(ctx context.Context, input UpdateDomainDKIMSelectorInput) (err error)
- type CreateDomainInput
- type DNSRecord
- type Domain
- type DomainConnection
- type DomainResponse
- type DomainTracking
- type RFC2822Time
- type SpamAction
- type TrackingStatus
- type UpdateDomainDKIMSelectorInput
Constants ¶
const ( // Tag the received message with headers providing a measure of its spamness. SpamActionTag = SpamAction("tag") // Prevents Mailgun from taking any action on what it perceives to be spam. SpamActionDisabled = SpamAction("disabled") // instructs Mailgun to just block or delete the message all-together. SpamActionDelete = SpamAction("delete") DKIMKeySize1024 = 1024 DKIMKeySize2048 = 2048 )
Use these to specify a spam action when creating a new domain.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
Message string `json:"message"`
}
See https://github.com/mailgun/mailgun.js/blob/master/lib/Types/Common/Error.ts and https://github.com/mailgun/mailgun.js/tree/master/lib/Classes and https://github.com/mailgun/mailgun.js/blob/master/lib/Types/Common/ApiResponse.ts
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateDomain ¶
func (*Client) DeleteDomain ¶
func (*Client) UpdateDomainDKIMSelector ¶
func (client *Client) UpdateDomainDKIMSelector(ctx context.Context, input UpdateDomainDKIMSelectorInput) (err error)
type CreateDomainInput ¶
type CreateDomainInput struct { Name string `json:"name"` SMTPPassword *string `json:"smtp_password"` SpamAction *SpamAction `json:"spam_action"` Wildcard *bool `json:"wildcard"` ForceDKIMAuthority *bool `json:"force_dkim_authority"` DKIMKeySize *int `json:"dkim_key_size"` IPS []string `json:"ips"` PoolID *string `json:"pool_id"` WebScheme *string `json:"web_scheme"` }
Optional parameters when creating a domain
type DNSRecord ¶
type DNSRecord struct { Priority string RecordType string `json:"record_type"` Valid string Name string Value string }
DNSRecord structures describe intended records to properly configure your domain for use with Mailgun. Note that Mailgun does not host DNS records.
type Domain ¶
type Domain struct { CreatedAt RFC2822Time `json:"created_at"` SMTPLogin string `json:"smtp_login"` Name string `json:"name"` SMTPPassword string `json:"smtp_password"` Wildcard bool `json:"wildcard"` SpamAction SpamAction `json:"spam_action"` State string `json:"state"` }
A Domain structure holds information about a domain used when sending mail.
type DomainConnection ¶
type DomainConnection struct { RequireTLS bool `json:"require_tls"` SkipVerification bool `json:"skip_verification"` }
Specify the domain connection options
type DomainResponse ¶
type DomainTracking ¶
type DomainTracking struct { Click TrackingStatus `json:"click"` Open TrackingStatus `json:"open"` Unsubscribe TrackingStatus `json:"unsubscribe"` }
Specify the domain tracking options
type RFC2822Time ¶
Mailgun uses RFC2822 format for timestamps everywhere ('Thu, 13 Oct 2011 18:02:00 GMT'), but by default Go's JSON package uses another format when decoding/encoding timestamps.
func NewRFC2822Time ¶
func NewRFC2822Time(str string) (RFC2822Time, error)
func (RFC2822Time) IsZero ¶
func (t RFC2822Time) IsZero() bool
func (RFC2822Time) MarshalJSON ¶
func (t RFC2822Time) MarshalJSON() ([]byte, error)
func (RFC2822Time) String ¶
func (t RFC2822Time) String() string
func (RFC2822Time) Unix ¶
func (t RFC2822Time) Unix() int64
func (*RFC2822Time) UnmarshalJSON ¶
func (t *RFC2822Time) UnmarshalJSON(s []byte) error
type SpamAction ¶
type SpamAction string
type TrackingStatus ¶
type TrackingStatus struct { Active bool `json:"active"` }
The tracking status of a domain