settings

package
v0.0.50 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: GPL-3.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HttpSettings

type HttpSettings = cs.HttpSettings

HttpSettings are settings of an HTTP server for incoming requests.

type Settings

type Settings struct {
	// Path to the file with these settings.
	FilePath string `json:"-"`

	// Program versioning information.
	VersionInfo *ver.Versioneer `json:"-"`

	HttpSettings   `json:"http"`
	SystemSettings `json:"system"`
	SmtpSettings   `json:"smtp"`
}

Settings is Server's settings.

func NewSettingsFromFile

func NewSettingsFromFile(filePath string, versionInfo *ver.Versioneer) (stn *Settings, err error)

func (*Settings) Check

func (stn *Settings) Check() (err error)

func (*Settings) UseConstructor

func (stn *Settings) UseConstructor(filePath string, versionInfo *ver.Versioneer) (cm.ISettings, error)

type SmtpSettings

type SmtpSettings struct {
	Host      string `json:"host"`
	Port      uint16 `json:"port"`
	User      string `json:"user"`
	Password  string `json:"password"`
	UserAgent string `json:"userAgent"`
}

SmtpSettings are parameters of the SMTP server used for sending e-mail messages. When a password is not set, it is taken from the stdin.

func (SmtpSettings) Check

func (s SmtpSettings) Check() (err error)

type SystemSettings

type SystemSettings struct {
	IsDebugMode bool `json:"isDebugMode"`
}

SystemSettings are system settings.

func (SystemSettings) Check

func (s SystemSettings) Check() (err error)

Jump to

Keyboard shortcuts

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