config

package
v0.0.0-...-5fee693 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2020 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrorLoading indicates that the config could not be loaded
	ErrorLoading = errors.New("can't load configuration file")
	// ErrorLogin indicates that no login has been provided
	ErrorLogin = errors.New("no login provided in the config file")
)

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	IsAuth bool
	// Cred holds the Twitch authentication credential
	Cred struct {
		Channel string
		Token   string
	}
	// Aggreg holds the information about the aggregator module
	Aggreg struct {
		StackSize int
		Channels  []string
	}
	// WebConf holds the web server details
	WebConf struct {
		IP       string
		Port     string
		URL      string
		Key      string
		Cert     string
		CSRF     []byte
		HashKey  []byte
		BlockKey []byte
		IsSecure bool
	}
	// MailConf holds the SMTP server details
	MailConf struct {
		Host     string
		Port     string
		From     string
		Username string
		Password string
	}
}

Configuration structure holds the configuration

func NewConfig

func NewConfig() (*Configuration, error)

NewConfig gets config from the YAML file and assign it's content to variables

Jump to

Keyboard shortcuts

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