models

package
v0.0.0-...-4f58271 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Domain

type Domain struct {
	gorm.Model
	Name string `json:"name"`
}

func (*Domain) RegisterInboundHook

func (d *Domain) RegisterInboundHook()

func (*Domain) SetupMX

func (d *Domain) SetupMX()

type Email

type Email struct {
	gorm.Model
	Headers     string `form:"headers"`
	DKIM        string `form:"dkim"`
	To          string `form:"to"`
	Text        string `form:"text"`
	HTML        string `form:"html"`
	From        string `form:"from"`
	SenderIp    string `form:"sender_ip"`
	SpamReport  string `form:"spam_report"`
	Envelope    string `form:"envelope"`
	Attachments string `form:"attachments"`
	Subject     string `form:"subject"`
	SpamScore   string `form:"spam_score"`
	SPF         string `form:"spf"`
}

type EmailAddress

type EmailAddress struct {
	gorm.Model
	MailboxID string  `json:"mailbox_id"`
	Mailbox   Mailbox `json:"mailbox"`
	Address   string  `json:"address"`
}

type Mailbox

type Mailbox struct {
	gorm.Model
	Name           string  `json:"name"`
	EmailAddresses []Email `json:"email_addresses"`
}

type SubDomain

type SubDomain struct {
	gorm.Model
	Name     string `json:"name"`
	DomainID uint   `json:"domain_id"`
	Domain   Domain `json:"domain"`
}

func (*SubDomain) RegisterInboundHook

func (sd *SubDomain) RegisterInboundHook()

func (*SubDomain) SetupMX

func (sd *SubDomain) SetupMX()

type User

type User struct {
	gorm.Model
	Name     string `json:"name"`
	Username string `json:"username" gorm:"unique"`
	Password string `json:"password"`
	IsAdmin  bool   `json:"is_admin" gorm:"default:false"`
}

func (*User) CheckPassword

func (user *User) CheckPassword(providedPassword string) error

func (*User) HashPassword

func (user *User) HashPassword(password string) error

Jump to

Keyboard shortcuts

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