config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewJadeConfig

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

NewJadeConfig 初始化Config方法

Types

type JadeConfig

type JadeConfig struct {
	contract.Config
	// contains filtered or unexported fields
}

func (*JadeConfig) Get

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

func (*JadeConfig) GetBool

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

func (*JadeConfig) GetFloat64

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

GetFloat64 get float64

func (*JadeConfig) GetInt

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

func (*JadeConfig) GetIntSlice

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

GetIntSlice get int slice type

func (*JadeConfig) GetString

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

GetString get string typen

func (*JadeConfig) GetStringMap

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

GetStringMap get map which key is string, value is interface

func (*JadeConfig) GetStringMapString

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

GetStringMapString get map which key is string, value is string

func (*JadeConfig) GetStringMapStringSlice

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

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

func (*JadeConfig) GetStringSlice

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

GetStringSlice get string slice type

func (*JadeConfig) GetTime

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

GetTime get time type

func (*JadeConfig) IsExist

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

func (*JadeConfig) Load

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

type JadeConfigProvider

type JadeConfigProvider struct {
	framework.ServiceProvider
}

func (*JadeConfigProvider) Boot

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

Boot will called when the service instantiate

func (*JadeConfigProvider) IsDefer

func (provider *JadeConfigProvider) IsDefer() bool

IsDefer define whether the service instantiate when first make or register

func (*JadeConfigProvider) Name

func (provider *JadeConfigProvider) Name() string

Name 代表了这个服务提供者的凭证

func (*JadeConfigProvider) Params

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

Params params 定义传递给 NewInstance 的参数,可以自定义多个,建议将 container 作为第一个参数

func (*JadeConfigProvider) Register

Register registe a new function for mak a service instance

Jump to

Keyboard shortcuts

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