Documentation ¶
Index ¶
- func NewErrFileNotFound(file, location string, err error) error
- func NewErrInvalidCfgExt(str string) error
- func NewErrUnsupportedCfgType(obj interface{}) error
- func NewErrUnsupportedUnmarshal(str string) error
- type Configurator
- type ErrFileNotFound
- type ErrInvalidCfgExt
- type ErrUnmarshal
- type ErrUnsupportedCfgType
- type ErrUnsupportedUnmarshal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewErrFileNotFound ¶
NewErrFileNotFound returns a new ErrFileNotFound
func NewErrInvalidCfgExt ¶
NewErrInvalidCfgExt returns a new ErrInvalidCfgExt error of not supported config file type
func NewErrUnsupportedCfgType ¶
func NewErrUnsupportedCfgType(obj interface{}) error
NewErrUnsupportedCfgType returns a new ErrUnsupportedCfgType
func NewErrUnsupportedUnmarshal ¶
NewErrUnsupportedUnmarshal returns a new ErrUnsupportedUnmarshal
Types ¶
type Configurator ¶
type Configurator struct {
// contains filtered or unexported fields
}
Configurator config manager
func (*Configurator) Initialize ¶
func (c *Configurator) Initialize(configFile string, cfgStructPtr interface{}) error
Initialize your config
func (*Configurator) Reset ¶
func (c *Configurator) Reset() *Configurator
Reset reset config manager
type ErrFileNotFound ¶
type ErrFileNotFound struct {
// contains filtered or unexported fields
}
ErrFileNotFound denotes failing to find configuration file.
func (ErrFileNotFound) Error ¶
func (e ErrFileNotFound) Error() string
Error returns the formatted configuration error.
func (ErrFileNotFound) Unwrap ¶
func (e ErrFileNotFound) Unwrap() error
Unwrap returns the underlying error.
type ErrInvalidCfgExt ¶
type ErrInvalidCfgExt string
ErrInvalidCfgExt denotes an invalid configuration type
func (ErrInvalidCfgExt) Error ¶
func (str ErrInvalidCfgExt) Error() string
Error returns the formatted configuration error.
type ErrUnmarshal ¶
type ErrUnmarshal struct {
// contains filtered or unexported fields
}
ErrUnmarshal denotes failing to unmarshal configuration file.
func NewErrUnmarshal ¶
func NewErrUnmarshal(err error, bs []byte, fType string, fCtr interface{}) *ErrUnmarshal
NewErrUnmarshal returns a new ErrUnmarshal
func (*ErrUnmarshal) Error ¶
func (e *ErrUnmarshal) Error() string
Error returns the formatted ErrUnmarshal.
type ErrUnsupportedCfgType ¶
type ErrUnsupportedCfgType struct {
// contains filtered or unexported fields
}
ErrUnsupportedCfgType denotes encountering an unsupported configuration file type.
func (ErrUnsupportedCfgType) Error ¶
func (e ErrUnsupportedCfgType) Error() string
Error returns the formatted configuration error.
type ErrUnsupportedUnmarshal ¶
type ErrUnsupportedUnmarshal string
ErrUnsupportedUnmarshal denotes an unsupported unmarshal type
func (ErrUnsupportedUnmarshal) Error ¶
func (u ErrUnsupportedUnmarshal) Error() string
Error returns the formatted configuration error.