Documentation ¶
Index ¶
- Constants
- Variables
- func Init(driverName string, args ...interface{}) error
- func KeyNamed(key string) string
- func RegistDriver(name string, driver Driver)
- type Client
- type Driver
- type Map
- type TomlClient
- type Value
- func (v *Value) Bool() (bool, error)
- func (v *Value) Float32() (float32, error)
- func (v *Value) Float64() (float64, error)
- func (v *Value) Int() (int, error)
- func (v *Value) Int32() (int32, error)
- func (v *Value) Int64() (int64, error)
- func (v *Value) Raw() (string, error)
- func (v *Value) String() (string, error)
- func (v *Value) UnmarshalJSON(dst interface{}) error
- func (v *Value) UnmarshalYAML(dst interface{}) error
Constants ¶
View Source
const (
//PeachDriverApollo
PeachDriverApollo = "apollo"
)
Variables ¶
View Source
var ( ErrNotExist = errors.New("peach: value key not exit") ErrDifferentType = errors.New("peach: value type different") ErrTypeAssertion = errors.New("paladin: value type assertion no match") )
ErrNotExist value key not exist.
Functions ¶
Types ¶
type Driver ¶
Driver defined paladin remote client impl each remote config center driver must do 1. implements `New` method
type Map ¶ added in v1.2.3
type Map struct {
// contains filtered or unexported fields
}
Map is config map, key(filename) -> value(file).
type TomlClient ¶
type TomlClient struct {
// contains filtered or unexported fields
}
TomlClient 解析toml文件的客户端
func (*TomlClient) NewToml ¶
func (t *TomlClient) NewToml(text []byte) (*TomlClient, error)
NewToml 新建toml
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value is config value
func (*Value) UnmarshalJSON ¶ added in v1.2.3
UnmarshalJSON unmarhsal json to struct.
func (*Value) UnmarshalYAML ¶
UnmarshalYAML unmarshal yaml to struct.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.