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"`
	CreateTime int64        `json:"create_time"`
	UpdateTime int64        `json:"update_time"`
}

type AccountState

type AccountState int32
const (
	AccountStateDisabled AccountState = 1
	AccountStateEnabled  AccountState = 2
)

func (AccountState) Valid

func (as AccountState) Valid() bool

type EmailContentType

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

func (EmailContentType) Valid

func (ect EmailContentType) Valid() bool

type ListAccountsFilter

type ListAccountsFilter struct {
	AccountID       int32        `json:"account_id"`
	AccountUsername string       `json:"account_username"`
	AccountHost     string       `json:"account_host"`
	AccountState    AccountState `json:"account_state"`
}

type ListSpacesFilter

type ListSpacesFilter struct {
	SpaceID    int32      `json:"space_id"`
	SpaceName  string     `json:"space_name"`
	SpaceState SpaceState `json:"space_state"`
}

type ListTemplatesFilter

type ListTemplatesFilter struct {
	AccountID     int32         `json:"account_id"`
	TemplateID    int64         `json:"template_id"`
	TemplateName  string        `json:"template_name"`
	TemplateState TemplateState `json:"template_state"`
	EmailSubject  string        `json:"email_subject"`
}

type SMTPAuth

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

type Space

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

type SpaceState

type SpaceState int32
const (
	SpaceStateDisabled SpaceState = 1
	SpaceStateEnabled  SpaceState = 2
)

func (SpaceState) Valid

func (ss SpaceState) Valid() bool

type Template

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

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
	TemplateStateDisabled TemplateState = 2
	TemplateStateEnabled  TemplateState = 3
)

func (TemplateState) Valid

func (ts TemplateState) Valid() bool

Jump to

Keyboard shortcuts

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