1 Star 0 Fork 0

后端组 / mvc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
configuration.go 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
heweiosc 提交于 2020-04-18 23:32 . add password for components
package Base
import "time"
// 配置操作对象
type IConfiguration interface {
// values
Strings(key string) []string
Ints(key string) []int
Float64s(key string) []float64
Durations(key string) []time.Duration
//
Get(string) (string, error)
GetDefault(string, string) string
//
GetInt(string) (int, error)
GetIntDefault(string, int) int
//
GetDuration(string) (time.Duration, error)
GetDurationDefault(string, time.Duration) time.Duration
//
GetBool(string) (bool, error)
GetBoolDefault(string, bool) bool
//
GetFloat64(string) (float64, error)
GetFloat64Default(string, float64) float64
Set(string, string)
SetAll(map[string]string)
Keys() []string
//t必须为指针型
Unmarshal(interface{}) error
// 获取特定前缀配置,返回新配置对象
Prefix(string,...bool) ConfigureFace
}
// 创建
type CreateAble interface {
Create() interface{}
}
// 配置管理(门脸)对象
type ConfigureFace interface {
IFaced // 门脸信息,门脸注册相关
IConfiguration // 实例操作集合
}
1
https://gitee.com/nuokwan_backend_group/mvc.git
git@gitee.com:nuokwan_backend_group/mvc.git
nuokwan_backend_group
mvc
mvc
1bf86c47ef7b

搜索帮助

53164aa7 5694891 3bd8fe86 5694891