mailadmin

package
v0.0.0-...-b47b16d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 11, 2015 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure

func Configure(cfg *mail2ajax.Config, router *mux.Router)

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 GetDomain

func GetDomain() (Domain, error)

func GetDomains

func GetDomains() ([]Domain, error)

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

func GetForwardings(domain string) ([]Forward, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL