Documentation ¶
Index ¶
- type DBConn
- func (db *DBConn) CheckAddressMode(username string) (int, error)
- func (db *DBConn) CheckUser(authMethod, username, cramPassword, cramSecret string) (int, error)
- func (db *DBConn) CheckUserWithPass(authMethod, username, cramPassword, cramSecret string) (int, string, error)
- func (db *DBConn) CleanupMessages(mailboxId int, inboxSettings InboxSettings) error
- func (db *DBConn) Close()
- func (db *DBConn) GeInboxSettings(mailboxId int) (InboxSettings, error)
- func (db *DBConn) IfUserExist(username string) bool
- func (db *DBConn) Pop3DeleteMessage(mailboxId, messageId int) error
- func (db *DBConn) Pop3Message(mailboxId, messageId int) (int, string, error)
- func (db *DBConn) Pop3MessagesCountAndSum(mailboxId int) (int, int, error)
- func (db *DBConn) Pop3MessagesList(mailboxId int) ([][2]int, error)
- func (db *DBConn) StoreAttachment(mailboxId int, messageId int, ...) (int, error)
- func (db *DBConn) StoreMail(mailboxId int, subject string, date time.Time, ...) (int, error)
- func (db *DBConn) UpdateSpamReport(mailboxId int, messageId int, spamReport string) (int, error)
- func (db *DBConn) UpdateVirusesReport(mailboxId int, messageId int, virusesReport string) (int, error)
- type InboxSettings
- type StorageConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConn ¶
func InitDatabase ¶
func InitDatabase(config *StorageConfig) (*DBConn, error)
func (*DBConn) CheckUserWithPass ¶
func (*DBConn) CleanupMessages ¶
func (db *DBConn) CleanupMessages(mailboxId int, inboxSettings InboxSettings) error
cleanup messages
func (*DBConn) GeInboxSettings ¶
func (db *DBConn) GeInboxSettings(mailboxId int) (InboxSettings, error)
func (*DBConn) IfUserExist ¶
func (*DBConn) Pop3DeleteMessage ¶
func (*DBConn) Pop3Message ¶
func (*DBConn) Pop3MessagesCountAndSum ¶
func (*DBConn) Pop3MessagesList ¶
func (*DBConn) StoreAttachment ¶
func (*DBConn) UpdateSpamReport ¶
type InboxSettings ¶
type InboxSettings struct {
MaxMessages, RateLimit int
}
type StorageConfig ¶
type StorageConfig struct { Adapter string Host string Port int Username string Password string Database string Pool int Pool_Idle int Auth_Sql string Settings_Sql string Messages_Sql string Attachments_Sql string Max_Messages_Enabled bool Max_Messages_Cleanup_Sql string Max_Attachments_Cleanup_Sql string Spamassassin_Sql string Clamav_Sql string Pop3_Count_And_Size_Messages string Pop3_Messages_List string Pop3_Message_One string Pop3_Message_Delete string Email_Address_Mode_Sql string }
Click to show internal directories.
Click to hide internal directories.