config

package
v0.0.0-...-65e9c33 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2018 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Global goconfig object
	Config *config.Config
)

Functions

func LoadConfig

func LoadConfig(filename string) error

LoadConfig loads the specified configuration file into inbucket.Config and performs validations on it.

Types

type DataStoreConfig

type DataStoreConfig struct {
	MimeParser    bool
	StoreMessages bool
	Storage       string
	MongoUri      string
	MongoDb       string
	MongoColl     string
}

func GetDataStoreConfig

func GetDataStoreConfig() DataStoreConfig

GetDataStoreConfig returns a copy of the DataStoreConfig object

type Pop3Config

type Pop3Config struct {
	Ip4address     net.IP
	Ip4port        int
	Domain         string
	MaxIdleSeconds int
}

func GetPop3Config

func GetPop3Config() Pop3Config

GetPop3Config returns a copy of the Pop3Config object

type SMTPMessage

type SMTPMessage struct {
	From   string
	To     []string
	Data   string
	Helo   string
	Host   string
	Domain string
	Hash   string
	Notify chan int
}

Used for message channel, avoids import cycle error

type SmtpConfig

type SmtpConfig struct {
	Ip4address      net.IP
	Ip4port         int
	Domain          string
	AllowedHosts    string
	TrustedHosts    string
	MaxRecipients   int
	MaxIdleSeconds  int
	MaxClients      int
	MaxMessageBytes int
	PubKey          string
	PrvKey          string
	StoreMessages   bool
	Xclient         bool
	HostGreyList    bool
	FromGreyList    bool
	RcptGreyList    bool
	Debug           bool
	DebugPath       string
	SpamRegex       string
}

SmtpConfig houses the SMTP server configuration - not using pointers so that I can pass around copies of the object safely.

func GetSmtpConfig

func GetSmtpConfig() SmtpConfig

GetSmtpConfig returns a copy of the SmtpConfig object

type WebConfig

type WebConfig struct {
	Ip4address       net.IP
	Ip4port          int
	TemplateDir      string
	TemplateCache    bool
	PublicDir        string
	GreetingFile     string
	ClientBroadcasts bool
	ConnTimeout      int
	RedisEnabled     bool
	RedisHost        string
	RedisPort        int
	RedisChannel     string
	CookieSecret     string
}

func GetWebConfig

func GetWebConfig() WebConfig

GetWebConfig returns a copy of the WebConfig object

Jump to

Keyboard shortcuts

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