settings

package
v0.14.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: MIT Imports: 4 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = module.Module{
	{Constructor: New},
}

Module of config things

Functions

func DIProvider

func DIProvider(di *dig.Container) *module.Provider

DIProvider wrap di into provider

func New added in v0.5.0

func New(app *Core) (*viper.Viper, error)

New init viper settings

func Viper

func Viper() *viper.Viper

Viper returns global Viper instance

Types

type Core added in v0.7.0

type Core struct {
	File         string
	Type         string
	Name         string
	Prefix       string
	BuildTime    string
	BuildVersion string
}

Core configuration

func (*Core) Provider added in v0.7.0

func (a *Core) Provider() *module.Provider

Provider - wrap app config to provider

func (Core) SafeType added in v0.7.0

func (a Core) SafeType() string

SafeType returns config type, default config type: yml returns yml if config type not supported

type Defaults

type Defaults interface{}

Defaults is callback that allows to setup application before run. Helium calls `defaults` handler at the end in `New` method.

Jump to

Keyboard shortcuts

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