utils

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDir

func CreateDir()

func GetAttachmentDir

func GetAttachmentDir() string

func GetDatabase

func GetDatabase() *sql.DB

func GetDir

func GetDir() string

func InsertMail

func InsertMail(folder string, mid uint32)

func Logger

func Logger(message string)

func MailExists

func MailExists(folder string, mid uint32) bool

func ScanMail

func ScanMail() bool

func SetupDatabase

func SetupDatabase() bool

Types

type Config

type Config struct {
	MailHost             string `mapstructure:"MAIL_HOST"`
	MailPort             string `mapstructure:"MAIL_PORT"`
	MailUsername         string `mapstructure:"MAIL_USERNAME"`
	MailPassword         string `mapstructure:"MAIL_PASSWORD"`
	MailFolder           string `mapstructure:"MAIL_FOLDER"`
	AttachmentFolderPath string `mapstructure:"ATTACHMENT_FOLDER_PATH"`
	StartTls             string `mapstructure:"STARTTLS"`
}

func LoadConfig

func LoadConfig(path string) (config Config, err error)

Jump to

Keyboard shortcuts

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