internal

package
v0.0.0-...-ceabe2d Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnsupportedFieldType cer.Error = "unsupported field type"
	ErrModelHasEmptyStruct  cer.Error = "an input struct has no fields"
	ErrNotAStruct           cer.Error = "the configuration must be a struct"
	ErrNotAddressable       cer.Error = "the main struct must be pointed out via pointer"
	ErrNotAddressableField  cer.Error = "the value is not addressable"
	ErrProcessing           cer.Error = "processing error"
	ErrBaseTypeNotMatch     cer.Error = "types not match"
	ErrInvalidOptions       cer.Error = "invalid value options"
	ErrInvalidOptionsType   cer.Error = "invalid options type"
	ErrExceedingExpectValue cer.Error = "exceeding the expected value"
	ErrUnsupportedFieldTag  cer.Error = "unsupported tag"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configurator

type Configurator struct {
	Viper *viper.Viper
	// contains filtered or unexported fields
}

func New

func New(name string, paths ...string) *Configurator

func (*Configurator) LoadOptions

func (c *Configurator) LoadOptions() error

func (*Configurator) LoadSettings

func (c *Configurator) LoadSettings(config interface{}) error

func (*Configurator) ReadOptions

func (c *Configurator) ReadOptions(config io.Reader) error

func (*Configurator) SetOption

func (c *Configurator) SetOption(options types.Options, value interface{}) error

type Handler

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

type LoadValues

type LoadValues map[string]interface{}

type Tags

type Tags map[string]string

Jump to

Keyboard shortcuts

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