common

package
v0.0.0-...-f39c8f6 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: GPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHUTDOWN = iota
	PING
)
View Source
const (
	StorageMessageTypeQuery           = StorageMessageType("QUERY")
	StorageMessageTypeSuccessResponse = StorageMessageType("RESPONSE")
)
View Source
const (
	StorageMessageCommandNone    = StorageMessageCommand("NONE")
	StorageMessageCommandIsValid = StorageMessageCommand("ISVALID")
	StorageMessageCommandList    = StorageMessageCommand("LIST")
	StorageMessageCommandRename  = StorageMessageCommand("RENAME")
	StorageMessageCommandCreate  = StorageMessageCommand("CREATE")
)

Variables

This section is empty.

Functions

func Bool2String

func Bool2String(b bool) string

func GetMainMessageLoop

func GetMainMessageLoop() chan MainEventMessage

func ParseQuoteAwareFields

func ParseQuoteAwareFields(rawString string, len int) []string

func StripQuotes

func StripQuotes(s string) string

Types

type ApplicationConfig

type ApplicationConfig struct {
	// contains filtered or unexported fields
}

func CreateDefaultAppConfig

func CreateDefaultAppConfig() *ApplicationConfig

func GetAppConfig

func GetAppConfig() *ApplicationConfig

func NewApplicationConfig

func NewApplicationConfig() *ApplicationConfig

func (*ApplicationConfig) GetApplicationVersion

func (config *ApplicationConfig) GetApplicationVersion() string

func (*ApplicationConfig) GetBackendConfig

func (config *ApplicationConfig) GetBackendConfig() *BackendConfig

func (*ApplicationConfig) GetImap4ServerConfig

func (config *ApplicationConfig) GetImap4ServerConfig() *Imap4ServerConfig

func (*ApplicationConfig) GetLogLevel

func (config *ApplicationConfig) GetLogLevel() uint32

func (*ApplicationConfig) GetSmtpServerConfig

func (config *ApplicationConfig) GetSmtpServerConfig() *SmtpServerConfig

func (*ApplicationConfig) PopulateDefault

func (e *ApplicationConfig) PopulateDefault() *ApplicationConfig

type BackendConfig

type BackendConfig struct {
	ListenInterface string
	Enabled         bool
}

func CreateDefaultBackendConfig

func CreateDefaultBackendConfig() *BackendConfig

type Imap4ServerConfig

type Imap4ServerConfig struct {
	Port                                    uint32
	Hostname                                string
	ListenInterface                         string
	SMTP_OPTION_SINGLE_MESSAGE_PER_SESSION  bool
	SMTP_OPTION_ALLOW_BARE_LINE_FEED_SUBMIT bool
	SMTP_OPTION_MAX_QUEUE_BUFFERED_ITEMS    int
	SMTP_OPTION_MAX_QUEUE_WORKERS           int
	Enabled                                 bool
}

func CreateDefaultImap4ServerConfig

func CreateDefaultImap4ServerConfig() *Imap4ServerConfig

type MailMessage

type MailMessage struct {
	To   string
	From string
	Data string

	QueueId string
}

type MailMessageType

type MailMessageType uint8

type MainEventMessage

type MainEventMessage struct {
	MessageType interface{}
	// contains filtered or unexported fields
}

type SmtpServerConfig

type SmtpServerConfig struct {
	Port                                    uint32
	Hostname                                string
	ListenInterface                         string
	SMTP_OPTION_SINGLE_MESSAGE_PER_SESSION  bool
	SMTP_OPTION_ALLOW_BARE_LINE_FEED_SUBMIT bool
	SMTP_OPTION_MAX_QUEUE_BUFFERED_ITEMS    int
	SMTP_OPTION_MAX_QUEUE_WORKERS           int
	SMTP_OPTION_BACKEND_INTERFACE           string
	Enabled                                 bool
}

func CreateDefaultSmtpServerConfig

func CreateDefaultSmtpServerConfig() *SmtpServerConfig

type StorageConnector

type StorageConnector interface {
	PerformSendReceive(StorageMessage) (StorageMessage, error)
}

type StorageMessage

type StorageMessage interface {
	MsgType() StorageMessageType
	MsgCommand() StorageMessageCommand
	MsgData() interface{}
	ToJson() string
}

type StorageMessageBuilder

type StorageMessageBuilder struct {
	// contains filtered or unexported fields
}

func (*StorageMessageBuilder) Build

func (*StorageMessageBuilder) IsValidCommandMessage

func (s *StorageMessageBuilder) IsValidCommandMessage(command string) *StorageMessageBuilder

func (*StorageMessageBuilder) MsgCommand

func (m *StorageMessageBuilder) MsgCommand() StorageMessageCommand

func (*StorageMessageBuilder) MsgData

func (m *StorageMessageBuilder) MsgData() interface{}

func (*StorageMessageBuilder) MsgType

func (m *StorageMessageBuilder) MsgType() StorageMessageType

func (*StorageMessageBuilder) StorageCommandMessage

func (s *StorageMessageBuilder) StorageCommandMessage(command string, args string) *StorageMessageBuilder

func (*StorageMessageBuilder) SuccessResponseMessage

func (s *StorageMessageBuilder) SuccessResponseMessage(msgData interface{}) *StorageMessageBuilder

func (*StorageMessageBuilder) ToJson

func (m *StorageMessageBuilder) ToJson() string

type StorageMessageCommand

type StorageMessageCommand string

type StorageMessageType

type StorageMessageType string

Jump to

Keyboard shortcuts

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