config

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2024 License: BSD-2-Clause Imports: 14 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 float32) float32

func (*Auto) GetInt added in v0.0.9

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

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.IService) 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]string    `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 float32) float32

func (*Env) GetInt

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

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.IService) 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"`
}

type Mock

type Mock struct {
	Data map[string]string
}

func NewMock added in v0.0.9

func NewMock(data map[string]string) *Mock

func (*Mock) GetBool

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

func (*Mock) GetFloat

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

func (*Mock) GetInt

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

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.IService) 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