email

package
v6.26.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateMailboxRequest

type CreateMailboxRequest struct {
	LocalPart    string `json:"localPart"`
	Password     string `json:"password"`
	MaxDiskUsage int    `json:"maxDiskUsage"`
	ForwardTo    string `json:"forwardTo"`
}

CreateMailboxRequest struct of a mailbox

type CreateMailforwardRequest

type CreateMailforwardRequest struct {
	ForwardTo string `json:"forwardTo"`
	LocalPart string `json:"localPart"`
}

CreateMailforwardRequest struct of a mailforward

type CreateMaillistRequest

type CreateMaillistRequest struct {
	EmailAddress string   `json:"emailAddress"`
	Entries      []string `json:"entries"`
	Name         string   `json:"name"`
}

CreateMaillistRequest struct of a maillist

type LinkAddonRequest added in v6.25.0

type LinkAddonRequest struct {
	// Action could be linkmailbox or unlinkmailbox
	Action string `json:"action"`
	// AddonID is the id of the addon to link
	AddonID int `json:"addonId"`
	// Mailbox is the email address associated with the mailbox
	Mailbox string `json:"mailbox"`
}

LinkAddonRequest is used to generate a json body that contains the Action, AddonID, and Mailbox properties

type MailAddon added in v6.25.0

type MailAddon struct {
	// ID is the ID of the addon
	ID int `json:"id"`
	// DiskSpace is the amount of disk space the addon provides
	DiskSpace int `json:"diskSpace"`
	// Mailboxes is the amount of extra mailboxes the addon provides
	Mailboxes int `json:"mailboxes"`
	// LinkedMailBox is the mailbox the addon is currently linked to, if any
	LinkedMailBox string `json:"linkedMailBox"`
	// CanBeLinked is whether this Addon is allowed to be linked
	CanBeLinked bool `json:"canBeLinked"`
}

MailAddon is the struct used to unmarshall the addon response.

type Mailbox

type Mailbox struct {
	Identifier         string `json:"identifier"`
	LocalPart          string `json:"localPart"`
	Domain             string `json:"domain"`
	ForwardTo          string `json:"forwardTo"`
	AvailableDiskSpace int    `json:"availableDiskSpace"`
	UsedDiskSpace      int    `json:"usedDiskSpace"`
	Status             string `json:"status"`
	IsLocked           bool   `json:"isLocked"`
	ImapServer         string `json:"imapServer"`
	ImapPort           int    `json:"imapPort"`
	SMTPServer         string `json:"smtpServer"`
	SMTPPort           int    `json:"smtpPort"`
	Pop3Server         string `json:"pop3Server"`
	Pop3Port           int    `json:"pop3Port"`
}

Mailbox struct of a mailbox

type Mailforward

type Mailforward struct {
	ID        int    `json:"id"`
	LocalPart string `json:"localPart"`
	Domain    string `json:"domain"`
	ForwardTo string `json:"forwardTo"`
	Status    string `json:"status"`
}

Mailforward struct of a mailforward

type Maillist

type Maillist struct {
	ID           int      `json:"id"`
	Name         string   `json:"name"`
	EmailAddress string   `json:"emailAddress"`
	Entries      []string `json:"entries"`
}

Maillist struct of a maillist

type Mailpackage added in v6.26.0

type Mailpackage struct {
	Domain string `json:"domain"`
	Status string `json:"status"`
}

Mailpackage struct of a mailpackage

type Repository

type Repository repository.RestRepository

Repository for creating and modifying mailboxes, mail forwards and mail lists

func (*Repository) CreateMailbox

func (r *Repository) CreateMailbox(domainName string, createRequest CreateMailboxRequest) error

CreateMailbox creates a new mailbox

func (*Repository) CreateMailforward

func (r *Repository) CreateMailforward(domainName string, createRequest CreateMailforwardRequest) error

CreateMailforward creates a mail forward

func (*Repository) CreateMaillist

func (r *Repository) CreateMaillist(domainName string, createRequest CreateMaillistRequest) error

CreateMaillist creates a mail list

func (*Repository) DeleteMailbox

func (r *Repository) DeleteMailbox(emailAddress string) error

DeleteMailbox deletes a mailbox

func (*Repository) DeleteMailforward

func (r *Repository) DeleteMailforward(domainName string, forwardID int) error

DeleteMailforward deletes a mail forward

func (*Repository) DeleteMaillist

func (r *Repository) DeleteMaillist(domainName string, maillistID int) error

DeleteMaillist deletes a mail list

func (*Repository) GetAddonsByDomainName added in v6.25.0

func (r *Repository) GetAddonsByDomainName(domainName string) ([]MailAddon, error)

GetAddonsByDomainName gets a list of mail addons associated with a domain

func (*Repository) GetMailboxByEmailAddress

func (r *Repository) GetMailboxByEmailAddress(emailAddress string) (Mailbox, error)

GetMailboxByEmailAddress returns a mailbox

func (*Repository) GetMailboxesByDomainName

func (r *Repository) GetMailboxesByDomainName(domainName string) ([]Mailbox, error)

GetMailboxesByDomainName returns all mailboxes by domain name

func (*Repository) GetMailforwardByDomainNameAndID

func (r *Repository) GetMailforwardByDomainNameAndID(domainName string, mailforwardID int) (Mailforward, error)

GetMailforwardByDomainNameAndID returns a mailbox

func (*Repository) GetMailforwardsByDomainName

func (r *Repository) GetMailforwardsByDomainName(domainName string) ([]Mailforward, error)

GetMailforwardsByDomainName returns all mail forwards by domain name

func (*Repository) GetMaillistByDomainNameAndID

func (r *Repository) GetMaillistByDomainNameAndID(domainName string, maillistID int) (Maillist, error)

GetMaillistByDomainNameAndID returns a mail list by domain name and ID

func (*Repository) GetMaillistsByDomainName

func (r *Repository) GetMaillistsByDomainName(domainName string) ([]Maillist, error)

GetMaillistsByDomainName returns all maillists by domain name

func (*Repository) GetMailpackages added in v6.26.0

func (r *Repository) GetMailpackages() ([]Mailpackage, error)

GetMailpackages gets a list of mail packages associated with a account

func (*Repository) LinkMailaddon added in v6.25.0

func (r *Repository) LinkMailaddon(addonID int, mailbox string) error

LinkMailaddon Links an addon to a mailbox

func (*Repository) UnlinkMailaddon added in v6.25.0

func (r *Repository) UnlinkMailaddon(addonID int, mailbox string) error

UnlinkMailaddon Unlinks an addon from a mailbox

func (*Repository) UpdateMailbox

func (r *Repository) UpdateMailbox(emailAddress string, updateRequest UpdateMailboxRequest) error

UpdateMailbox updates a mailbox

func (*Repository) UpdateMailforward

func (r *Repository) UpdateMailforward(domainName string, forwardID int, updateRequest UpdateMailforwardRequest) error

UpdateMailforward updates a mail forward

func (*Repository) UpdateMaillist

func (r *Repository) UpdateMaillist(domainName string, maillistID int, updateRequest UpdateMaillistRequest) error

UpdateMaillist updates a mail list

type UpdateMailboxRequest

type UpdateMailboxRequest struct {
	Password     string `json:"password"`
	MaxDiskUsage int    `json:"maxDiskUsage"`
	ForwardTo    string `json:"forwardTo"`
}

UpdateMailboxRequest struct of a mailbox

type UpdateMailforwardRequest

type UpdateMailforwardRequest struct {
	ForwardTo string `json:"forwardTo"`
	LocalPart string `json:"localPart"`
}

UpdateMailforwardRequest struct of a mailforward

type UpdateMaillistRequest

type UpdateMaillistRequest struct {
	EmailAddress string   `json:"emailAddress"`
	Entries      []string `json:"entries"`
}

UpdateMaillistRequest struct of a maillist

Jump to

Keyboard shortcuts

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