settings

package
v0.14.0-rc.11 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Module of config things. nolint:gochecknoglobals

Functions

func DIProvider

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

DIProvider wrap di into provider.

func New

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

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

Core configuration.

func (*Core) Provider

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

Provider - wrap app config to provider.

func (*Core) SafeType

func (a *Core) SafeType() string

SafeType returns config type, default config type: yaml. returns yml if config type not supported. nolint:goconst

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