go_conf

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: MIT Imports: 4 Imported by: 0

README

go_conf

Packaging viper for daily multi-environment configuration

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Confhub

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

func New

func New(file string, defConfFile ...string) *Confhub

func (*Confhub) ConfigChange

func (c *Confhub) ConfigChange(fn func(e fsnotify.Event))

func (*Confhub) Exist

func (c *Confhub) Exist() bool

func (*Confhub) Get

func (c *Confhub) Get(key string) (value interface{})

func (*Confhub) GetAll

func (c *Confhub) GetAll() map[string]interface{}

func (*Confhub) Object

func (c *Confhub) Object() *viper.Viper

func (*Confhub) ReadConf

func (c *Confhub) ReadConf() (data map[string]interface{}, err error)

func (*Confhub) Set

func (c *Confhub) Set(key string, value interface{})

func (*Confhub) Unmarshal

func (c *Confhub) Unmarshal(rawVal interface{}, opts ...viper.DecoderConfigOption) error

func (*Confhub) WriteConf

func (c *Confhub) WriteConf(filepath ...string) error

Jump to

Keyboard shortcuts

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