config

package
v0.0.0-...-dfd69a5 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MySQL struct {
		Addr           string `yaml:"addr" json:"addr"`
		Username       string `yaml:"username" json:"username"`
		Password       string `yaml:"password" json:"password"`
		Database       string `yaml:"database" json:"database"`
		DatasourceName string `yaml:"datasource_name" json:"-"`
	} `yaml:"mysql"`
	Listen string `yaml:"listen"`
	Web    struct {
		Dir       string `yaml:"dir"`
		IndexFile string `yaml:"index_file"`
	} `yaml:"web"`
	Inactive bool                 `yaml:"inactive"`
	Channels []events.ChannelSpec `yaml:"channels"`

	Auth struct {
		LoginRedirect   string `yaml:"login_redirect"`
		SecretKey       string `yaml:"secret_key"`
		EnableProxyAuth bool   `yaml:"enable_proxy_auth"`
	} `yaml:"auth"`

	Admin map[string]string `yaml:"admin"`
}

Config is the main configuration structure

func Parse

func Parse(content []byte) (Config, error)

func ParseFile

func ParseFile(file string) (Config, error)

Jump to

Keyboard shortcuts

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