viper_server

package
v1.2.15 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmptyName = errors.New("config'name can't be empty value")
)

Functions

func Init

func Init(vc ViperConfig) error

Init

Types

type ViperConfig

type ViperConfig struct {
	Debug     bool
	Directory string
	Name      string
	Type      string
	Default   []byte
	Watch     func(*viper.Viper) error
}

func (ViperConfig) IsFileExist

func (vc ViperConfig) IsFileExist() bool

IsFileExist

func (ViperConfig) Recover added in v1.2.0

func (vc ViperConfig) Recover(b []byte) error

Recover recover config file content

func (ViperConfig) Remove

func (vc ViperConfig) Remove() error

Remove remove config file

Jump to

Keyboard shortcuts

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