config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auto added in v0.0.9

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

func NewAuto added in v0.0.9

func NewAuto(cfg AutoConfig) *Auto

func (*Auto) GetBool added in v0.0.9

func (t *Auto) GetBool(key string, def bool) bool

func (*Auto) GetFloat added in v0.0.9

func (t *Auto) GetFloat(key string, def float64) float64

func (*Auto) GetInt added in v0.0.9

func (t *Auto) GetInt(key string, def int) int

func (*Auto) GetMapBool added in v0.1.1

func (t *Auto) GetMapBool(key string, def map[string]bool) map[string]bool

func (*Auto) GetMapFloat added in v0.1.1

func (t *Auto) GetMapFloat(key string, def map[string]float64) map[string]float64

func (*Auto) GetMapInt added in v0.1.1

func (t *Auto) GetMapInt(key string, def map[string]int) map[string]int

func (*Auto) GetMapString added in v0.1.1

func (t *Auto) GetMapString(key string, def map[string]string) map[string]string

func (*Auto) GetSliceBool added in v0.1.1

func (t *Auto) GetSliceBool(key string, def []bool) []bool

func (*Auto) GetSliceFloat added in v0.1.1

func (t *Auto) GetSliceFloat(key string, def []float64) []float64

func (*Auto) GetSliceInt added in v0.1.1

func (t *Auto) GetSliceInt(key string, def []int) []int

func (*Auto) GetSliceString added in v0.1.1

func (t *Auto) GetSliceString(key string, def []string) []string

func (*Auto) GetString added in v0.0.9

func (t *Auto) GetString(key string, def string) string

func (*Auto) Has added in v0.0.9

func (t *Auto) Has(key string) bool

func (*Auto) Init added in v0.0.9

func (t *Auto) Init(app interfaces.IEngine) error

func (*Auto) Stop added in v0.0.9

func (t *Auto) Stop() error

type AutoConfig added in v0.0.9

type AutoConfig struct {
	FName string `yaml:"filename"`
}

type Data added in v0.0.9

type Data struct {
	Engine map[string]cfgModule   `yaml:"engine"`
	Cfg    map[string]interface{} `yaml:"cfg"`
}

type Env

type Env struct {
	Config EnvConfig
	// contains filtered or unexported fields
}

func NewEnv added in v0.0.9

func NewEnv(cfg EnvConfig) *Env

func (*Env) GetBool

func (t *Env) GetBool(key string, def bool) bool

func (*Env) GetFloat

func (t *Env) GetFloat(key string, def float64) float64

func (*Env) GetInt

func (t *Env) GetInt(key string, def int) int

func (*Env) GetMapBool added in v0.1.1

func (t *Env) GetMapBool(key string, def map[string]bool) map[string]bool

func (*Env) GetMapFloat added in v0.1.1

func (t *Env) GetMapFloat(key string, def map[string]float64) map[string]float64

func (*Env) GetMapInt added in v0.1.1

func (t *Env) GetMapInt(key string, def map[string]int) map[string]int

func (*Env) GetMapString added in v0.1.1

func (t *Env) GetMapString(key string, def map[string]string) map[string]string

func (*Env) GetSliceBool added in v0.1.1

func (t *Env) GetSliceBool(key string, def []bool) []bool

func (*Env) GetSliceFloat added in v0.1.1

func (t *Env) GetSliceFloat(key string, def []float64) []float64

func (*Env) GetSliceInt added in v0.1.1

func (t *Env) GetSliceInt(key string, def []int) []int

func (*Env) GetSliceString added in v0.1.1

func (t *Env) GetSliceString(key string, def []string) []string

func (*Env) GetString

func (t *Env) GetString(key string, def string) string

func (*Env) Has

func (t *Env) Has(key string) bool

func (*Env) Init

func (t *Env) Init(app interfaces.IEngine) error

func (*Env) ParseFile

func (t *Env) ParseFile(data []byte)

func (*Env) Stop

func (t *Env) Stop() error

type EnvConfig added in v0.0.9

type EnvConfig struct {
	FName              string `yaml:"filename"`
	ValueItemDelimiter string `yaml:"value_delimiter"`
	ItemDelimiter      string `yaml:"item_delimiter"`
}

type Mock

type Mock struct {
	Data map[string]interface{}
}

func NewMock added in v0.0.9

func NewMock(data map[string]interface{}) *Mock

func (*Mock) GetBool

func (t *Mock) GetBool(key string, def bool) bool

func (*Mock) GetFloat

func (t *Mock) GetFloat(key string, def float64) float64

func (*Mock) GetInt

func (t *Mock) GetInt(key string, def int) int

func (*Mock) GetMapBool added in v0.1.1

func (t *Mock) GetMapBool(key string, def map[string]bool) map[string]bool

func (*Mock) GetMapFloat added in v0.1.1

func (t *Mock) GetMapFloat(key string, def map[string]float64) map[string]float64

func (*Mock) GetMapInt added in v0.1.1

func (t *Mock) GetMapInt(key string, def map[string]int) map[string]int

func (*Mock) GetMapString added in v0.1.1

func (t *Mock) GetMapString(key string, def map[string]string) map[string]string

func (*Mock) GetSliceBool added in v0.1.1

func (t *Mock) GetSliceBool(key string, def []bool) []bool

func (*Mock) GetSliceFloat added in v0.1.1

func (t *Mock) GetSliceFloat(key string, def []float64) []float64

func (*Mock) GetSliceInt added in v0.1.1

func (t *Mock) GetSliceInt(key string, def []int) []int

func (*Mock) GetSliceString added in v0.1.1

func (t *Mock) GetSliceString(key string, def []string) []string

func (*Mock) GetString

func (t *Mock) GetString(key string, def string) string

func (*Mock) Has

func (t *Mock) Has(key string) bool

func (*Mock) Init

func (t *Mock) Init(_ interfaces.IEngine) error

func (*Mock) Stop

func (t *Mock) Stop() error

Jump to

Keyboard shortcuts

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