config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	ConfigPath        string
	PresenterOpt      presenter.Option
	Output            string `mapstructure:"output"`
	ScopeOpt          scope.Option
	Scope             string  `mapstructure:"scope"`
	Quiet             bool    `mapstructure:"quiet"`
	Log               Logging `mapstructure:"log"`
	CliOptions        CliOnlyOptions
	CheckForAppUpdate bool `mapstructure:"check-for-app-update"`
}

func LoadConfigFromFile

func LoadConfigFromFile(v *viper.Viper, cliOpts *CliOnlyOptions) (*Application, error)

func (*Application) Build

func (cfg *Application) Build() error

type CliOnlyOptions

type CliOnlyOptions struct {
	ConfigPath string
	Verbosity  int
}

type Logging

type Logging struct {
	Structured   bool `mapstructure:"structured"`
	LevelOpt     logrus.Level
	Level        string `mapstructure:"level"`
	FileLocation string `mapstructure:"file"`
}

Jump to

Keyboard shortcuts

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