Documentation ¶
Index ¶
- type CreateEmailRequest
- type CreateForwardRequest
- type Email
- func (e *Email) CreateEmail(domain string, req CreateEmailRequest) (err error)
- func (e *Email) CreateForward(domain string, req CreateForwardRequest) (err error)
- func (e *Email) DeleteEmail(domain, mailbox_id string) (err error)
- func (e *Email) DeleteForward(domain, source string) (err error)
- func (e *Email) GetForwards(domain string) (forwards []GetForwardRequest, err error)
- func (e *Email) GetMailbox(domain, mailbox_id string) (mailbox MailboxResponse, err error)
- func (e *Email) ListMailboxes(domain string) (mailboxes []ListMailboxResponse, err error)
- func (e *Email) UpdateEmail(domain, mailbox_id string, req UpdateEmailRequest) (err error)
- func (e *Email) UpdateForward(domain, source string, req UpdateForwardRequest) (err error)
- type GetForwardRequest
- type ListMailboxResponse
- type MailboxResponse
- type UpdateEmailRequest
- type UpdateForwardRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateEmailRequest ¶
type CreateEmailRequest struct { Login string `json:"login"` MailboxType string `json:"mailbox_type"` Password string `json:"password"` Aliases []string `json:"aliases,omitempty"` }
CreateEmailRequest create mailbox request
type CreateForwardRequest ¶
type CreateForwardRequest struct { Source string `json:"source"` Destinations []string `json:"destinations"` }
CreateForwardRequest structure for forwarding request
type Email ¶
type Email struct {
// contains filtered or unexported fields
}
Email is the API client to the Gandi v5 Email API
func NewFromClient ¶
NewFromClient returns an instance of the Email API client
func (*Email) CreateEmail ¶
func (e *Email) CreateEmail(domain string, req CreateEmailRequest) (err error)
CreateEmail creates a new mailbox for the given domain
func (*Email) CreateForward ¶
func (e *Email) CreateForward(domain string, req CreateForwardRequest) (err error)
CreateForward creates forwarding
func (*Email) DeleteEmail ¶
DeleteEmail remove mailbox
func (*Email) DeleteForward ¶
DeleteForward delete forwarding
func (*Email) GetForwards ¶
func (e *Email) GetForwards(domain string) (forwards []GetForwardRequest, err error)
GetForwards retrieves all forwardings for domain
func (*Email) GetMailbox ¶
func (e *Email) GetMailbox(domain, mailbox_id string) (mailbox MailboxResponse, err error)
GetMailbox returns all the parameters linked to a specific mailbox
func (*Email) ListMailboxes ¶
func (e *Email) ListMailboxes(domain string) (mailboxes []ListMailboxResponse, err error)
ListMailboxes list mailboxes attached to domain
func (*Email) UpdateEmail ¶
func (e *Email) UpdateEmail(domain, mailbox_id string, req UpdateEmailRequest) (err error)
UpdateEmail update mailbox parameters
func (*Email) UpdateForward ¶
func (e *Email) UpdateForward(domain, source string, req UpdateForwardRequest) (err error)
UpdateForward update forwarding
type GetForwardRequest ¶
type GetForwardRequest struct { Source string `json:"source"` Destinations []string `json:"destinations"` Href string `json:"href"` }
GetForwardRequest structure for forwarding responses
type ListMailboxResponse ¶
type ListMailboxResponse struct { Address string `json:"address"` Antispam bool `json:"antispam"` Autorenew struct { Duration int `json:"duration"` DurationType string `json:"duration_type"` Enabled bool `json:"enabled"` } `json:"autorenew"` Domain string `json:"domain"` ExpiresAt time.Time `json:"expires_at"` Href string `json:"href"` ID string `json:"id"` Login string `json:"login"` MailboxType string `json:"mailbox_type"` QuotaUsed int `json:"quota_used"` }
ListMailboxResponse describes mailbox
type MailboxResponse ¶
type MailboxResponse struct { Address string `json:"address"` Aliases []string `json:"aliases"` Antispam bool `json:"antispam"` Autorenew struct { Duration int `json:"duration"` DurationType string `json:"duration_type"` Enabled bool `json:"enabled"` } `json:"autorenew"` Domain string `json:"domain"` ExpiresAt time.Time `json:"expires_at"` Href string `json:"href"` ID string `json:"id"` Login string `json:"login"` MailboxType string `json:"mailbox_type"` QuotaUsed int `json:"quota_used"` Responder struct { Message string `json:"message"` Enabled bool `json:"enabled"` } `json:"responder"` }
MailboxResponse mailbox parameters
type UpdateEmailRequest ¶
type UpdateEmailRequest struct { Login string `json:"login,omitempty"` Password string `json:"password,omitempty"` Aliases []string `json:"aliases"` }
UpdateEmailRequest update mailbox request
type UpdateForwardRequest ¶
type UpdateForwardRequest struct {
Destinations []string `json:"destinations"`
}
UpdateForwardRequest structure for updating forwarding