4 Star 5 Fork 4

Plato / Service-Box-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
reader.go 859 Bytes
一键复制 编辑 原始数据 按行查看 历史
CloudGuan 提交于 2022-03-09 18:22 . update: read host from config
package reader
import (
"gitee.com/dennis-kk/service-box-go/util/config/source"
"time"
)
// Reader is an interface for merging changesets
type Reader interface {
Merge(...*source.ChangeSet) (*source.ChangeSet, error)
Values(*source.ChangeSet) (Values, error)
String() string
}
// Values is returned by the reader
type Values interface {
Bytes() []byte
Get(path ...string) Value
Map() map[string]interface{}
Scan(v interface{}) error //will unmarshall to readable struct
}
// Value represents a value of any type
type Value interface {
IsNil() bool
Bool(def bool) bool
Int(def int) int
String(def string) string
Float64(def float64) float64
Duration(def time.Duration) time.Duration
StringSlice(def []string) []string
StringMap(def map[string]string) map[string]string
Scan(val interface{}) error
Bytes() []byte
Get(key string) Value
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/dennis-kk/service-box-go.git
git@gitee.com:dennis-kk/service-box-go.git
dennis-kk
service-box-go
Service-Box-go
v0.5.16

搜索帮助