Documentation ¶
Index ¶
- func ParseKey(key string) (kind, id string)
- func RegisterType(name string, creator func(object IObject) IObject)
- type A
- type Array
- func (s *Array) Dispose()
- func (s *Array) RefBool(index int) bool
- func (s *Array) RefFloat64(index int) float64
- func (s *Array) RefInt(index int) int
- func (s *Array) RefLength() int
- func (s *Array) RefObject(index int) (r IObject)
- func (s *Array) RefOrigin(index int) interface{}
- func (s *Array) RefOriginBool(index int) bool
- func (s *Array) RefOriginFloat(index int) float64
- func (s *Array) RefOriginInt(index int) int
- func (s *Array) RefString(index int) (val string)
- func (s *Array) RefUint(index int) (val uint)
- type IArray
- type IModify
- type IObject
- type IRoot
- type M
- type Object
- func (s *Object) Dispose()
- func (s *Object) RefAny(field string) (val interface{})
- func (s *Object) RefAnyType() string
- func (s *Object) RefArray(field string) (r IArray)
- func (s *Object) RefBool(field string) bool
- func (s *Object) RefClassCreator(field string, creator func(object IObject) IObject)
- func (s *Object) RefFloat64(field string) float64
- func (s *Object) RefInt(field string) int
- func (s *Object) RefIsNil() bool
- func (s *Object) RefKeys() (r []string)
- func (s *Object) RefLength() int
- func (s *Object) RefMap(field string) (r IObject)
- func (s *Object) RefObject(field string) (r IObject)
- func (s *Object) RefOrigin(field string) interface{}
- func (s *Object) RefOriginBool(field string) bool
- func (s *Object) RefOriginFloat(field string) float64
- func (s *Object) RefOriginInt(field string) int
- func (s *Object) RefString(field string) (val string)
- func (s *Object) RefUint(field string) (val uint)
- type Root
- type Source
- func (p *Source) AddModify(val IModify)
- func (s *Source) ClassCatalog() string
- func (s *Source) ClassId() string
- func (s *Source) ClassKey() string
- func (s *Source) ClassType() string
- func (s *Source) Clone() (r *Source)
- func (s *Source) Dispose()
- func (s *Source) Get(ctx interface{}, path string) interface{}
- func (s *Source) GetOrigin(path string) interface{}
- func (s *Source) IsNil(path string) bool
- func (s *Source) Length(path string) int
- func (s *Source) MapKeys(path string) []string
- func (s *Source) SetClassId(val string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterType ¶
Types ¶
type Array ¶
type Array struct {
// contains filtered or unexported fields
}
修正对象 如果需要在运行时,替换源的数据,可通过设置runtime实现
func (*Array) RefOriginBool ¶
func (*Array) RefOriginFloat ¶
func (*Array) RefOriginInt ¶
type IObject ¶
type IObject interface { RefOrigin(field string) interface{} RefInt(field string) (val int) RefUint(field string) (val uint) RefFloat64(field string) (val float64) RefString(field string) (val string) RefBool(field string) (val bool) RefMap(field string) (r IObject) RefObject(field string) (r IObject) RefArray(field string) (r IArray) RefIsNil() bool RefKeys() (r []string) RefLength() int RefClassCreator(field string, creator func(object IObject) IObject) RefAnyType() string }
type Object ¶
type Object struct {
// contains filtered or unexported fields
}
修正对象 如果需要在运行时,替换源的数据,可通过设置runtime实现
func (*Object) RefAnyType ¶
func (*Object) RefClassCreator ¶
func (*Object) RefOriginBool ¶
func (*Object) RefOriginFloat ¶
func (*Object) RefOriginInt ¶
type Root ¶
type Root struct { *Object // contains filtered or unexported fields }
func (*Root) RefClassCatalog ¶
func (*Root) RefClassId ¶
func (*Root) RefClassKey ¶
func (*Root) RefClassType ¶
func (*Root) RefDispose ¶
func (s *Root) RefDispose()
func (*Root) RefSetContext ¶
func (s *Root) RefSetContext(ctx interface{})
type Source ¶
type Source struct {
// contains filtered or unexported fields
}
数据源 通常加载后,数据源不可变,作为配置文件的映射 采用数据源的目的是为了避免数据的克隆影响性能,毕竟需要修正的地方有限
func NewSourceWith ¶
func (*Source) ClassCatalog ¶
func (*Source) SetClassId ¶
Click to show internal directories.
Click to hide internal directories.