config

package
v1.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadWithFilePath added in v1.4.6

func LoadWithFilePath(path string, config interface{}) error

func LoadWithReader added in v1.4.6

func LoadWithReader(reader io.Reader, config interface{}) error

Types

type Configurator

type Configurator struct {
	// contains filtered or unexported fields
}

func New

func New() *Configurator

func SetConfigType added in v1.4.6

func SetConfigType(configType string) *Configurator

func SetTagName added in v1.4.6

func SetTagName(tagName string) *Configurator

func (*Configurator) Kernel

func (c *Configurator) Kernel() *viper.Viper

func (*Configurator) LoadWithFilePath added in v1.4.6

func (c *Configurator) LoadWithFilePath(path string, config interface{}) error

func (*Configurator) LoadWithReader added in v1.4.6

func (c *Configurator) LoadWithReader(reader io.Reader, config interface{}) error

LoadWithReader need point out the configType, default is json, can use SetConfigType to change

func (*Configurator) SetConfigType added in v1.4.6

func (c *Configurator) SetConfigType(configType string) *Configurator

func (*Configurator) SetTagName added in v1.4.6

func (c *Configurator) SetTagName(tagName string) *Configurator

Jump to

Keyboard shortcuts

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