cfg

package
v0.0.0-...-22e6143 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BugreportConfig

type BugreportConfig struct {
	ServiceDeskAddress           string  `yaml:"address"`
	ServiceDeskRateLimitInterval float64 `yaml:"rateLimitInterval"` // See bugreport.go
	ServiceDeskRateLimitReports  int     `yaml:"rateLimitReports"`  // See bugreport.go

}

type Config

type Config struct {
	Port             int64           `yaml:"port"`
	StartDate        string          `yaml:"startDate"`
	Key              string          `yaml:"cookieKey"`
	ChallengeInfoDir string          `yaml:"challDir"`
	ChallHost        string          `yaml:"challHost"`
	BugreportConfig  BugreportConfig `yaml:"bugreport"`
	EmailConfig      EmailConfig     `yaml:"email"`
	DesignConfig     DesignConfig    `yaml:"design"`
}

Config stores settings

func GetConfig

func GetConfig() (Config, error)

GetConfig returns a config struct generated either from a config.json or (TODO) from Environment

type DesignConfig

type DesignConfig struct {
	Icon        string        `yaml:"logo"`
	CoinIcon    string        `yaml:"coinicon"`
	Favicon     string        `yaml:"favicon"`
	UpperLeft   template.HTML `yaml:"logoText"`
	Header      string        `yaml:"title"`
	FooterLinks []FooterLink  `yaml:"links"`
	Slogan      template.HTML `yaml:"slogan"`
}

type EmailConfig

type EmailConfig struct {
	RestrictEmailDomains                 []string      `yaml:"allowedDomains"`
	RequireEmailVerification             bool          `yaml:"verification"`
	EmailVerificationTokenLifetimeString string        `yaml:"verificationTokenLifetime"`
	EmailVerificationTokenLifetime       time.Duration `yaml:"-"`
	SMTPRelayString                      string        `yaml:"smtpAddressWithPort"`
	SMTPRelayPasswd                      string        `yaml:"smtpPassword"`
}
type FooterLink struct {
	Name string `yaml:"name"`
	Icon string `yaml:"icon"`
	Url  string `yaml:"url"`
}

Jump to

Keyboard shortcuts

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