Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSample ¶
GenerateSample creates a sample configuration file
Types ¶
type Config ¶
type Config struct {
IMAP IMAPConfig `json:"imap"`
Database DatabaseConfig `json:"database"`
Server ServerConfig `json:"server"`
}
Config holds the application configuration
type DatabaseConfig ¶
type DatabaseConfig struct {
Path string `json:"path" env:"DATABASE_PATH"`
}
DatabaseConfig holds database configuration
type IMAPConfig ¶
type IMAPConfig struct {
Host string `json:"host" env:"IMAP_HOST"`
Port int `json:"port" env:"IMAP_PORT" envDefault:"993"`
Username string `json:"username" env:"IMAP_USERNAME"`
Password string `json:"password" env:"IMAP_PASSWORD"`
Mailbox string `json:"mailbox" env:"IMAP_MAILBOX" envDefault:"INBOX"`
UseTLS bool `json:"use_tls" env:"IMAP_USE_TLS" envDefault:"true"`
}
IMAPConfig holds IMAP server configuration
type ServerConfig ¶
type ServerConfig struct {
Port int `json:"port" env:"SERVER_PORT" envDefault:"8080"`
Host string `json:"host" env:"SERVER_HOST" envDefault:"0.0.0.0"`
}
ServerConfig holds web server configuration
Click to show internal directories.
Click to hide internal directories.