webserver

package
v0.0.0-...-736556e Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoSQLConfig = fmt.Errorf("no mysql config present")

ErrNoSQLConfig is returned if no mysql config is present.

Functions

func Start

func Start(config *Config) error

Start runs the app.

Types

type Config

type Config struct {
	ListenAddr  string   `toml:"listen_addr" xml:"listen_addr" json:"listenAddr"`
	Password    string   `toml:"password" xml:"password" json:"-"`
	LogFile     string   `toml:"log_file" xml:"log_file" json:"logFile"`
	ErrorFile   string   `toml:"error_file" xml:"error_file" json:"errorFile"`
	NoAuthPaths []string `toml:"no_auth_paths" xml:"no_auth_path" json:"noAuthPaths"`

	*userinfo.Config // contains mysql host, user, pass, logger.
	// contains filtered or unexported fields
}

Config is the input data for the server.

func LoadConfig

func LoadConfig(filename string) (*Config, error)

LoadConfig reads in a config file and/or env variables to configure the app.

Jump to

Keyboard shortcuts

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