config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Path of config file
	Path string
)

Functions

This section is empty.

Types

type Backend

type Backend struct {
	URL      string `ini:"URL"`
	User     string `ini:"USER"`
	Password string `ini:"PASSWORD"`
}

Backend defines the api backend configuration

type Config

type Config struct {
	General General
	Backend Backend
	Log     Log
}

Config defines the general configuration.

func New

func New() (*Config, error)

New prepares a new default configuration.

type General

type General struct {
	WatchFile    string `ini:"WATCH_FILE"`
	Root         string `ini:"ROOT"`
	RestartDelay int    `ini:"RESTART_DELAY"`
}

General defines the general configuration.

type Log

type Log struct {
	Level   string `ini:"LEVEL"`
	Colored bool   `ini:"COLORED"`
	Pretty  bool   `ini:"PRETTY"`
}

Log defines the logging configuration.

Jump to

Keyboard shortcuts

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