Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { BillingEmail string `json:"billing_email"` CancelsOn interface{} `json:"cancels_on"` CardBrand string `json:"card_brand"` CompanyDetails string `json:"company_details"` CompanyName string `json:"company_name"` CompanyVat interface{} `json:"company_vat"` Country string `json:"country"` Created int64 `json:"created"` Email string `json:"email"` EmailHash string `json:"email_hash"` IsOtpEnabled bool `json:"is_otp_enabled"` Last4 string `json:"last4"` Limits *AccountLimit `json:"limits"` LockReason string `json:"lock_reason"` Locked bool `json:"locked"` Password bool `json:"password"` Plan *AccountPlan `json:"plan"` Premium bool `json:"premium"` PrivacyLevel int `json:"privacy_level"` RenewDate int64 `json:"renew_date"` }
type AccountLimit ¶
type AccountLimit struct { Aliases int `json:"aliases"` API int `json:"api"` Credentials int `json:"credentials"` DailyQuota int `json:"daily_quota"` DailySend int `json:"daily_send"` Destinations int `json:"destinations"` Domains int `json:"domains"` Ratelimit int `json:"ratelimit"` Redirections int `json:"redirections"` Subdomains int `json:"subdomains"` }
type AccountPlan ¶
type Client ¶
type Client interface { SetUserAgent(agent string) error SetHTTPClient(client *http.Client) GetAccount(ctx context.Context) (*Account, error) GetWhitelabels(ctx context.Context) (*[]Whitelabel, error) ListDomains(ctx context.Context, query *QueryDomain) (*[]Domain, error) AddDomain(ctx context.Context, domain *Domain) (*Domain, error) GetDomain(ctx context.Context, domain string) (*Domain, error) UpdateDomain(ctx context.Context, domain *Domain) (*Domain, error) DeleteDomain(ctx context.Context, domain *Domain) error CheckDomain(ctx context.Context, domain string) (*Check, error) ListAliases(ctx context.Context, domain string) (*[]Alias, error) CreateAlias(ctx context.Context, domain string, alias *Alias) (*Alias, error) UpdateAlias(ctx context.Context, domain string, alias *Alias) (*Alias, error) DeleteAlias(ctx context.Context, domain string, alias *Alias) error ListSMTPCredentials(ctx context.Context, domain string) (*[]SMTPCredential, error) CreateSMTPCredential(ctx context.Context, domain string, credential *WriteSMTPCredential) (*SMTPCredential, error) UpdateSMTPCredential(ctx context.Context, domain string, credential *WriteSMTPCredential) (*SMTPCredential, error) DeleteSMTPCredential(ctx context.Context, domain string, credential *SMTPCredential) error GetLogs(ctx context.Context, query *QueryLog) (*[]Log, error) }
type Domain ¶
type Domain struct { Domain string `json:"domain"` Active bool `json:"active,omitempty"` Display string `json:"display,omitempty"` DkimSelector string `json:"dkim_selector,omitempty"` NotificationEmail string `json:"notification_email,omitempty"` Webhook string `json:"webhook,omitempty"` Whitelabel string `json:"whitelabel,omitempty"` Added int64 `json:"added,omitempty"` Aliases *[]Alias `json:"aliases,omitempty"` }
type Log ¶
type Log struct { Created string `json:"created"` CreatedRaw string `json:"created_raw"` Events []struct { Code int `json:"code"` Created string `json:"created"` ID string `json:"id"` Local string `json:"local"` Message string `json:"message"` Server string `json:"server"` Status string `json:"status"` } `json:"events,omitempty"` Forward struct { Email string `json:"email"` Name string `json:"name"` } `json:"forward,omitempty"` Hostname string `json:"hostname"` ID string `json:"id"` MessageID string `json:"messageId"` Recipient struct { Email string `json:"email"` Name string `json:"name"` } `json:"recipient,omitempty"` Sender struct { Email string `json:"email"` Name string `json:"name"` } `json:"sender,omitempty"` Subject string `json:"subject"` Transport string `json:"transport"` }
type PaginationOptions ¶
type QueryDomain ¶
type QueryDomain struct { Query string `json:"q,omitempty"` IsActive bool `json:"is_active,omitempty"` PaginationOptions }
type Record ¶
type Record struct { Expected *RecordValues `json:"expected"` Valid bool `json:"valid"` Values *RecordValues `json:"values"` }
type RecordValues ¶
type RecordValues []string
func (RecordValues) Interface ¶
func (values RecordValues) Interface() []interface{}
func (RecordValues) MarshalJSON ¶
func (values RecordValues) MarshalJSON() ([]byte, error)
func (*RecordValues) UnmarshalJSON ¶
func (values *RecordValues) UnmarshalJSON(b []byte) error
type Response ¶
type Response struct { Success bool `json:"success"` Errors map[string][]string `json:"errors,omitempty"` Total int `json:"total,omitempty"` PaginationOptions }
type SMTPCredential ¶
type Whitelabel ¶
type Whitelabel struct {
Name string `json:"name"`
}
type WriteSMTPCredential ¶
Click to show internal directories.
Click to hide internal directories.