config

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 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 Database

type Database struct {
	Host     string `toml:"host"`
	Port     int    `toml:"port"`
	User     string `toml:"username"`
	Password string `toml:"password"`
	Name     string `toml:"database"`
}

Database contains configuration details for database.

type EventAPI added in v0.0.10

type EventAPI struct {
	Enabled bool   `toml:"enabled"`
	Host    string `toml:"host"`
	Port    int    `toml:"port"`
}

func (*EventAPI) Address added in v0.0.10

func (api *EventAPI) Address() string

type Settings

type Settings struct {
	DB       Database `toml:"database"`
	EventAPI EventAPI `toml:"event_api"`
}

Settings is decoded configuration file.

func New

func New(path string) (*Settings, error)

New reads application configuration from specified file path.

Jump to

Keyboard shortcuts

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