config

package
v0.0.0-...-74836cc Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Timezone      string          `yaml:"timezone"`
	SendInterval  uint16          `yaml:"send_interval"`
	FetchInterval uint16          `yaml:"fetch_interval"`
	Database      *DatabaseConfig `yaml:"database"`
	Mailbox       *MailboxConfig  `yaml:"mailbox"`
	IMAP          *ServerConfig   `yaml:"imap"`
	SMTP          *ServerConfig   `yaml:"smtp"`
}

func GetConfig

func GetConfig() *Config

func (*Config) Location

func (conf *Config) Location() *time.Location

type DatabaseConfig

type DatabaseConfig struct {
	URL string `yaml:"url"`
}

func GetDatabaseConfig

func GetDatabaseConfig(prefix string) *DatabaseConfig

type MailboxConfig

type MailboxConfig struct {
	In        string `yaml:"in"`
	Processed string `yaml:"processed"`
}

func GetMailboxConfig

func GetMailboxConfig(prefix string) *MailboxConfig

type ServerConfig

type ServerConfig struct {
	Address       string     `yaml:"address"`
	Password      string     `yaml:"password"`
	Authenticated bool       `yaml:"authenticated"`
	Host          string     `yaml:"host"`
	Port          uint16     `yaml:"port"`
	Tls           *TlsConfig `yaml:"tls"`
}

func GetServerConfig

func GetServerConfig(prefix string) *ServerConfig

func (*ServerConfig) TlsConfig

func (sc *ServerConfig) TlsConfig() *tls.Config

type TlsConfig

type TlsConfig struct {
	Enabled  bool `yaml:"enabled"`
	Insecure bool `yaml:"insecure"`
}

Jump to

Keyboard shortcuts

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