model

package
v0.4.3-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID       int32        `json:"id"`
	Host     string       `json:"host"`
	Port     int32        `json:"port"`
	Username string       `json:"username"`
	Password string       `json:"-"`
	SMTPAuth SMTPAuth     `json:"smtp_auth"`
	State    AccountState `json:"state"`
}

func (Account) Enabled

func (a Account) Enabled() bool

type AccountState

type AccountState int32
const (
	AccountStateEnabled AccountState = 2
)

type Email

type Email struct {
	TemplateID    int64             `json:"template_id"`
	To            []string          `json:"to"`
	CC            []string          `json:"cc"`
	BCC           []string          `json:"bcc"`
	SubjectParams map[string]string `json:"subject_params"`
	ContentParams map[string]string `json:"content_params"`
}

type EmailContentType

type EmailContentType int32
const (
	EmailContentTypePlain EmailContentType = 1
	EmailContentTypeHTML  EmailContentType = 2
)

func (EmailContentType) String

func (ect EmailContentType) String() string

type SMTPAuth

type SMTPAuth int32
const (
	SMTPAuthPlain   SMTPAuth = 1
	SMTPAuthLogin   SMTPAuth = 2
	SMTPAuthCramMD5 SMTPAuth = 3
	SMTPAuthXOAUTH2 SMTPAuth = 4
)

func (SMTPAuth) String

func (sa SMTPAuth) String() string

type Space

type Space struct {
	ID    int32      `json:"id"`
	Name  string     `json:"name"`
	Token string     `json:"-"`
	State SpaceState `json:"state"`
}

func (*Space) Enabled

func (s *Space) Enabled() bool

type SpaceState

type SpaceState int32
const (
	SpaceStateEnabled SpaceState = 2
)

type Template

type Template struct {
	ID        int64         `json:"id"`
	AccountID int32         `json:"account_id"`
	Name      string        `json:"name"`
	Email     TemplateEmail `json:"email"`
	State     TemplateState `json:"state"`
}

func (*Template) Enabled

func (t *Template) Enabled() bool

type TemplateEmail

type TemplateEmail struct {
	Subject     string           `json:"subject"`
	To          []string         `json:"to"`
	CC          []string         `json:"cc"`
	BCC         []string         `json:"bcc"`
	ContentType EmailContentType `json:"content_type"`
	Content     string           `json:"content"`
}

type TemplateState

type TemplateState int32
const (
	TemplateStateDeleted TemplateState = 1
	TemplateStateEnabled TemplateState = 3
)

Jump to

Keyboard shortcuts

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