config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHadeConfig

func NewHadeConfig(params ...interface{}) (interface{}, error)

NewHadeConfig初始化Config方法

Types

type HadeConfig

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

HadeConfig表示hade框架的配置文件服务

func (*HadeConfig) Get

func (conf *HadeConfig) Get(key string) interface{}

func (*HadeConfig) GetBool

func (conf *HadeConfig) GetBool(key string) bool

func (*HadeConfig) GetFloat64

func (conf *HadeConfig) GetFloat64(key string) float64

func (*HadeConfig) GetInt

func (conf *HadeConfig) GetInt(key string) int

func (*HadeConfig) GetIntSlice

func (conf *HadeConfig) GetIntSlice(key string) []int

func (*HadeConfig) GetString

func (conf *HadeConfig) GetString(key string) string

func (*HadeConfig) GetStringMap

func (conf *HadeConfig) GetStringMap(key string) map[string]interface{}

func (*HadeConfig) GetStringMapString

func (conf *HadeConfig) GetStringMapString(key string) map[string]string

func (*HadeConfig) GetStringMapStringSlice

func (conf *HadeConfig) GetStringMapStringSlice(key string) map[string][]string

func (*HadeConfig) GetStringSlice

func (conf *HadeConfig) GetStringSlice(key string) []string

func (*HadeConfig) GetTime

func (conf *HadeConfig) GetTime(key string) time.Time

func (*HadeConfig) IsExist

func (conf *HadeConfig) IsExist(key string) bool

func (*HadeConfig) Load

func (conf *HadeConfig) Load(key string, val interface{}) error

Load a config to a struct, val should be an pointer

type HadeConfigProvider

type HadeConfigProvider struct{}

func (*HadeConfigProvider) Boot

func (provider *HadeConfigProvider) Boot(c framework.Container) error

func (*HadeConfigProvider) IsDefer

func (provider *HadeConfigProvider) IsDefer() bool

func (*HadeConfigProvider) Name

func (provider *HadeConfigProvider) Name() string

func (*HadeConfigProvider) Params

func (provider *HadeConfigProvider) Params(c framework.Container) []interface{}

func (*HadeConfigProvider) Register

Jump to

Keyboard shortcuts

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