settings

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2018 License: ISC Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Settings

type Settings struct {
	// default section
	Root              string // root directory for zkserver
	Users             string // user home directories
	Listen            string // listen address and port
	AllowIdentify     bool   // identify server policy
	CreatePolicy      string // create account server policy
	Directory         bool   // whether we keep a directory of identities
	MOTD              string // filename to message of the day
	MaxAttachmentSize uint64 // maximum attachment size
	MaxChunkSize      uint64 // maximum chunk size
	MaxMsgSize        uint64 // maximum message size

	// log section
	LogFile    string // log filename
	TimeFormat string // debug file time stamp format
	Debug      bool   // enable debug
	Trace      bool   // enable tracing
	Profiler   string // go profiler link
}

Settings is the collection of all zkserver settings. This is separated out in order to be able to reuse in various tests.

func New

func New() *Settings

New returns a default settings structure.

func (*Settings) Load

func (s *Settings) Load(filename string) error

Load retrieves settings from an ini file. Additionally it expands all ~ to the current user home directory.

Jump to

Keyboard shortcuts

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