config

package
v2.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2019 License: MIT Imports: 6 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Adapter struct {
		Protocol      protocolType
		Host          string
		Port          int
		Hostname      string
		Auth          bool
		Tls           bool
		Ssl_Hostname  string
		Ssl_Pub_Key   string
		Ssl_Prv_Key   string
		Welcome_Msg   string
		Max_Mail_Size int
		Rate_Limit    int
		Workers_Size  int
	}
	Storage            *storage.StorageConfig
	Email_Address_Mode struct {
		Enabled bool
		Domains []string
	}
	Pop3 struct {
		Enabled      bool
		Host         string
		Port         int
		Hostname     string
		Tls          bool
		Ssl_Hostname string
		Ssl_Pub_Key  string
		Ssl_Prv_Key  string
	}
	Spamassassin struct {
		Enabled bool
		Ip      string
		Port    int
		Timeout int
	}
	Clamav struct {
		Enabled bool
		Host    string
		Port    int
		Timeout int
	}
	Proxy struct {
		Enabled      bool
		Proxy_Mode   bool
		Host         string
		Port         int
		Exclude_Self bool
		Client_Ports struct {
			Smtp []int
			Pop3 []int
		}
	}
	Redis struct {
		Enabled       bool
		Host          string
		Port          int
		Pool          int
		Timeout       int
		Hook_Username string
		Hook_Password string
		Sidekiq_Queue string
		Sidekiq_Class string
	}
	Log struct {
		Debug bool
	}
	DbPool         *storage.DBConn
	RedisPool      *redis.Pool
	SmtpPortRanges []int
	Pop3PortRanges []int
}

func NewConfig

func NewConfig() *Config

NewConfig returns a new Config without any options.

func ReadConfig

func ReadConfig(filename string) (*Config, error)

ReadEnvirons reads the juju config.yml file and returns the result of running Config on the file's contents.

Jump to

Keyboard shortcuts

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