conf

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2017 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoltConnect

func BoltConnect(config *Configuration) (*bolt.DB, error)

func ConfigureLogging

func ConfigureLogging(config *LoggingConfig) (*logrus.Entry, error)

ConfigureLogging will take the logging configuration and also adds a few default parameters

Types

type Configuration

type Configuration struct {
	API struct {
		Host string `mapstructure:"host" json:"host"`
		Port int    `mapstructure:"port" json:"port"`
	} `mapstructure:"api" json:"api"`

	DB struct {
		Path string `mapstructure:"path" json:"path"`
	} `mapstructure:"db" json:"db"`

	LogConf struct {
		Level string `mapstructure:"level"`
		File  string `mapstructure:"file"`
	} `mapstructure:"log_conf"`
}

func Load

func Load(configFile string) (*Configuration, error)

Load will construct the config from the file

type LoggingConfig

type LoggingConfig struct {
	Level string
	File  string
}

LoggingConfig specifies all the parameters needed for logging

Jump to

Keyboard shortcuts

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