config

package
v0.0.0-...-88e70e1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLadeConfig

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

NewLadeConfig 初始化Config方法

Types

type LadeConfig

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

LadeConfig 表示lade框架的配置文件服务

func (*LadeConfig) Get

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

Get 获取某个配置项

func (*LadeConfig) GetBool

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

GetBool 获取bool类型配置

func (*LadeConfig) GetFloat64

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

GetFloat64 get float64

func (*LadeConfig) GetInt

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

GetInt 获取int类型配置

func (*LadeConfig) GetIntSlice

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

GetIntSlice get int slice type

func (*LadeConfig) GetString

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

GetString get string typen

func (*LadeConfig) GetStringMap

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

GetStringMap get map which key is string, value is interface

func (*LadeConfig) GetStringMapString

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

GetStringMapString get map which key is string, value is string

func (*LadeConfig) GetStringMapStringSlice

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

GetStringMapStringSlice get map which key is string, value is string slice

func (*LadeConfig) GetStringSlice

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

GetStringSlice get string slice type

func (*LadeConfig) GetTime

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

GetTime get time type

func (*LadeConfig) IsExist

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

IsExist check setting is exist

func (*LadeConfig) Load

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

加载map,转换为struct

type LadeConfigProvider

type LadeConfigProvider struct{}

func (*LadeConfigProvider) Boot

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

Boot will called when the service instantiate

func (*LadeConfigProvider) IsDefer

func (provider *LadeConfigProvider) IsDefer() bool

IsDefer define whether the service instantiate when first make or register

func (*LadeConfigProvider) Name

func (provider *LadeConfigProvider) Name() string

/ Name define the name for this service

func (*LadeConfigProvider) Params

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

Params define the necessary params for NewInstance

func (*LadeConfigProvider) Register

Register registe a new function for make a service instance

Jump to

Keyboard shortcuts

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