tegutypes

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2021 License: GPL-3.0 Imports: 3 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CtxValuesStruct

type CtxValuesStruct struct {
	Debug    bool
	NodeID   string
	DataDir  string
	Settings SettingsDbPlugin
	Plugins
}

type DeliveryItem

type DeliveryItem struct {
	MID    string
	Helo   string
	IP     string
	TLS    bool
	Sender string
	Rcpt   string
	MsgRW  MessageReaderWriter
	Body   []byte
}

-----------------------------------------------------------------------------

type DeliveryState

type DeliveryState struct {
	DestDir     string
	Store       bool
	Redirected  bool
	StopProcess bool
}

type ImapFetchIter

type ImapFetchIter interface {
	ImapIterator
	Val() (uint64, string, error)
}

type ImapFolder

type ImapFolder interface {
	Close()
	GetSubscription() ImapSubscription
	GetParsedRules() []*RuleStruct
	SaveRules([]*RuleStruct)
	MsgInfos() []*ImapMsgInfo
	GetMsgTime(*ImapMsgInfo) time.Time
	GetMsgBodystructure(*ImapMsgInfo) (string, string)
	GetMsgEnvelopeFields(*ImapMsgInfo) string
	GetMsgFlagNames(info *ImapMsgInfo) []string
	AddFlagNamesToMsg(*ImapMsgInfo, []string) (int, []string)
	SetMsgFlagNames(*ImapMsgInfo, []string) (int, []string)
	DelFlagNamesFromMsg(*ImapMsgInfo, []string) (int, []string)
	GetName() string
	GetUsage() int
	GetUidValidity() uint64
	GetCurrentMsgCount() uint64
	GetUidNext() uint64
	GetFirstUnseenNum() uint64
	CheckRecent(keepRecent bool) uint64
	GetReaderWriterForNewMessage() (MessageReaderWriter, error)
	AddMsg(MessageReaderWriter, time.Time) (string, error)
	AddFolder(string)
	GetFolder(string) ImapFolder
	RemoveFolder(string) error
	RenameFolder(string, string) error
	ExpungeReturnNums() []uint64
	GetSystemFolders() []string
	GetIMAPDefaultFolders() map[string]string
	GetSearchIter(string, bool) ImapSearchIter
	GetFetchIter(string, string, bool) ImapFetchIter
	GetStoreIter(string, string, string, bool, bool) ImapStoreFlagsIter
	CopyTo(string, int, int, int, ImapFolder, bool) error
	ListFolders() []string
	ExistingFlags() []string
	SetReadOnly(bool)
	IsReadOnly() bool
}

type ImapIterator

type ImapIterator interface {
	Next() bool
	Close()
}

type ImapMboxInfo

type ImapMboxInfo struct {
	Recent, Unseen, Exists, Uidnext, Uidvalidity uint64
}

type ImapMessage

type ImapMessage interface {
	SetInfo(*ImapMsgInfo)
	GetInfo() *ImapMsgInfo
	GetPartBySectionNum(partN []int) ImapMessage
	GetAsBytes() []byte
	GetBody() ([]byte, error)
	GetHeader() ImapMessageHeader
	IsMultipart() bool
	MultipartReader() ImapMessageMultipartReader
	Close() error
}

type ImapMessageHeader

type ImapMessageHeader interface {
	ContentType() (string, map[string]string, error)
	Text(string) (string, error)
	GetFields() ImapMessageHeaderFields
	FieldsByKey(k string) ImapMessageHeaderFields
	Get(string) string
}

type ImapMessageHeaderFields

type ImapMessageHeaderFields interface {
	Next() bool
	Raw() ([]byte, error)
	Key() string
	Value() string
}

-----------------------------------------------------------------------------

type ImapMessageMultipartReader

type ImapMessageMultipartReader interface {
	NextPart() (ImapMessage, error)
}

type ImapMsgInfo

type ImapMsgInfo struct {
	Uid    uint64
	Num    uint64
	Mid    string
	Date   int64
	Size   int64
	Params map[string]string
}

-----------------------------------------------------------------------------

type ImapMsgInfoIter

type ImapMsgInfoIter interface {
	ImapIterator
	Val() *ImapMsgInfo
}

type ImapNumSetIter

type ImapNumSetIter interface {
	Next() bool
	Val() *ImapMsgInfo
	Valid() bool
	Close()
}

type ImapSearchIter

type ImapSearchIter interface {
	ImapIterator
	Val() uint64
}

type ImapSetRange

type ImapSetRange struct {
	Start uint64
	End   uint64
}

type ImapStoreFlagsIter

type ImapStoreFlagsIter interface {
	ImapIterator
	Val() (uint64, string, error)
}

type ImapSubscription

type ImapSubscription interface {
	Subscribe(string)
	Unsubscribe(string)
	Subscribed() []string
	Close()
}

type MailStorage added in v1.1.2

type MailStorage struct {
	MailDomain string
	PluginName string
	PluginDesc string
}

type MailstoragePlugin

type MailstoragePlugin interface {
	Plugin
	GetInbox(string, string) ImapFolder
	GetDefaultQuota(string) int
	GetTrashAdditionalQuota(string) int
	GetSmartHost(string) *SmartHost
}

type MessageReaderWriter

type MessageReaderWriter interface {
	FileName() string
	Name() string // путь до файла, как был передан при открытии
	Read(p []byte) (n int, err error)
	ReadAll() ([]byte, error)
	Seek(offset int64, whence int) (int64, error)
	Write([]byte) (int, error)
	Sync() error
	Close() error
	ReOpen() error
	Destroy() error
	GetFlags() []string
	SetFlags([]string)
	Params() map[string]interface{}
}

----------------------------------------------------------------------------- -----------------------------------------------------------------------------

type Plugin

type Plugin interface {
	IsShared() bool
	Init(context.Context) bool
	SetSettingsDb(SettingsDbPlugin)
	GetName() string
	GetPType() int
	GetDesc() string
	GetVersion() string
	GetEmptySettings() []interface{}
	GetSettings(string) []interface{}
	SetSettings(string, map[string]string)
	DelSettings(string) error
	WebExists() bool
	Web(string, string, map[string]string) (interface{}, error)
}

type PluginEngine added in v1.1.2

type PluginEngine interface {
	Get(context.Context, string, int) (interface{}, error)
}

type QueueItem

type QueueItem struct {
	QId              string
	RetryCount       int
	LastTryTimestamp int64
	MessageId        string
	Helo             string
	Ip               string
	Tls              bool
	RecvTimestamp    int64
	SenderEmail      string
	RcptEmail        string
}

-----------------------------------------------------------------------------

type QueueMessage

type QueueMessage struct {
	ReaderWriter MessageReaderWriter
	IP           string
	Helo         string
	SenderEmail  string
	Recipients   []string
	TLS          bool
	ID           string
	ListedAt     []string
}

type RuleActionStruct

type RuleActionStruct struct {
	Actions [][]string
}

type RuleConditionStruct

type RuleConditionStruct struct {
	Op         string
	Conditions [][]string
}

type RuleStruct

type RuleStruct struct {
	Name      string
	Condition *RuleConditionStruct
	Action    *RuleActionStruct
}

type SettingsDbPlugin

type SettingsDbPlugin interface {
	Plugin
	Open(map[string]string) error
	SetString(string, string) error
	SetStringList(string, []string) error
	SetInt(string, int64) error
	SetIntList(string, []int64) error
	SetFloat(string, float64) error
	SetFloatList(string, []float64) error
	SetBool(string, bool) error
	GetString(string) string
	GetStringList(string) []string
	GetInt(string) int64
	GetIntList(string) []int64
	GetFloat(string) float64
	GetFloatList(string) []float64
	GetBool(string) bool
	Del(string) error
	StrListAppend(string, string) error
	StrListExclude(string, string) error
	StrListContains(string, string) bool
	IntListAppend(string, int64) error
	IntListExclude(string, int64) error
	IntListContains(string, int64) bool
	FloatListAppend(string, float64) error
	FloatListExclude(string, float64) error
	FloatListContains(string, float64) bool
	Close()
}

type SmartHost

type SmartHost struct {
	Host string
	Port int
	User string
	Pass string
}

-----------------------------------------------------------------------------

type SmtpQueue added in v1.1.2

type SmtpQueue struct {
	PluginName string
}

type SmtpQueuePlugin

type SmtpQueuePlugin interface {
	Plugin
	Open() error
	GetTempReaderWriter() MessageReaderWriter
	GetNewMsgReaderWriter() MessageReaderWriter
	AddMessageForRcpt(string, []byte, *QueueMessage) error
	GetQueueItems() []*QueueItem
	GetQueueItemReaderWriter(string) MessageReaderWriter
	DeleteQueueItem(string)
	UpdateQueueRetry(string, int, int64)
	GetAsImapMessage(io.Reader) ImapMessage
	IsSeen(string, string) bool
	MarkAsSeen(string, string) error
	Close()
}

type UserDBPlugin

type UserDBPlugin interface {
	Plugin
	Auth(string, string, string, bool) bool
	UserByEmail(string, string) string
	ExpandAlias(string, string) []string
	NormalEmail(string, string) string
	UserQuotaMB(string, string) int
}

type UserDBProvider added in v1.1.2

type UserDBProvider struct {
	Name       string
	MailDomain string
	PluginName string
	PluginDesc string
	SourceID   string
}

++++++++++++++++++++++++++++++++++++

Jump to

Keyboard shortcuts

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