cmd

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run()

Run is the main entry point

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

func NewConfig(name string) *Config

NewConfig creates a new configuration identified by the program name

func (*Config) GetListenAddress added in v0.2.0

func (c *Config) GetListenAddress() string

GetListenAddress returns the listen address string based on the configured address family

func (*Config) GetListenNetwork added in v0.2.0

func (c *Config) GetListenNetwork() string

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

Jump to

Keyboard shortcuts

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