Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶ added in v0.2.0
type Config struct { // Name is the Name of this configuration, e.g., "nuqql-mattermostd" Name string // Dir is the working directory Dir string // AF is the address family of the server socket: // inet (for AF_INET) or unix (for AF_UNIX) AF string // Address is the AF_INET listen Address Address string // Port is the AF_INET listen Port Port uint16 // Sockfile is the AF_UNIX socket file in the working directory Sockfile string // Loglevel is the logging level: debug, info, warn, error Loglevel string // DisableHistory disables the message history DisableHistory bool // PushAccounts toggles pushing accounts to the client on connect PushAccounts bool // FilterOwn toggles filtering of own messages FilterOwn bool // DisableEncryption disables TLS encryption DisableEncryption bool }
Config stores the configuration
func NewConfig ¶ added in v0.2.0
NewConfig creates a new configuration identified by the program name
func (*Config) GetListenAddress ¶ added in v0.2.0
GetListenAddress returns the listen address string based on the configured address family
func (*Config) GetListenNetwork ¶ added in v0.2.0
GetListenNetwork returns the listen network string based on the configured address family
func (*Config) ReadFromFile ¶ added in v0.2.0
func (c *Config) ReadFromFile()
ReadFromFile reads the config from the configuration file "config.json" in the working directory
Click to show internal directories.
Click to hide internal directories.