Documentation ¶
Index ¶
- func Configure(cfg *mail2ajax.Config, router *mux.Router)
- func DomainAjaxHandler(resp http.ResponseWriter, req *http.Request)
- func DomainsAjaxHandler(resp http.ResponseWriter, req *http.Request)
- func ForwardingsHandler(resp http.ResponseWriter, req *http.Request)
- type Domain
- type DomainPayload
- type DomainsPayload
- type Forward
- type ForwardingsPayload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DomainAjaxHandler ¶
func DomainAjaxHandler(resp http.ResponseWriter, req *http.Request)
Handles /ajax/domain/example.com
func DomainsAjaxHandler ¶
func DomainsAjaxHandler(resp http.ResponseWriter, req *http.Request)
Handles /ajax/domains
func ForwardingsHandler ¶
func ForwardingsHandler(resp http.ResponseWriter, req *http.Request)
Types ¶
type Domain ¶
type Domain struct { //DomainID int `db:"domain_id" json:"domain_id"` Domain string `db:"domain" json:"domain"` Description string `db:"description" json:"description"` Aliases int `db:"aliases" json:"aliases"` Mailboxes int `db:"mailboxes" json:"mailboxes"` MaxQuota int `db:"maxquota" json:"maxquota"` Quota int `db:"quota" json:"quota"` Transport string `db:"transport" json:"transport"` BackupMx int `db:"backupmx" json:"backupmx"` Created string `db:"created" json:"created"` Modified string `db:"modified" json:"modified"` Active int `db:"active" json:"active"` }
func GetDomains ¶
gets forwardings from database TODO filter by domain in source
type DomainPayload ¶
type DomainPayload struct { Success bool `json:"success"` // keep extjs happy Domain Domain `json:"domain"` Error string `json:"error"` }
func NewDomainPayload ¶
func NewDomainPayload() DomainPayload
type DomainsPayload ¶
type DomainsPayload struct { Success bool `json:"success"` // keep extjs happy Domains []Domain `json:"domains"` Error string `json:"error"` }
func NewDomainsPayload ¶
func NewDomainsPayload() DomainsPayload
type Forward ¶
type Forward struct { FwdID int `db:"fwd_id" json:"fwd_id"` Source string `db:"source" json:"source"` Destination string `db:"destination" json:"destination"` }
func GetForwardings ¶
gets forwardings from database TODO filter by domain in source
type ForwardingsPayload ¶
type ForwardingsPayload struct { Success bool `json:"success"` // keep extjs happy Forwardings []Forward `json:"forwardings"` Error string `json:"error"` }
func NewForwardingsPayload ¶
func NewForwardingsPayload() ForwardingsPayload
Click to show internal directories.
Click to hide internal directories.