gitee.com/zhongguo168a/gocodes@v0.0.0-20230609140523-e1828349603f/datax/modifyx2/iface.go (about) 1 package modifyx 2 3 type IRoot interface { 4 IObject 5 6 RefClassId() string 7 // Catalog/Id 8 RefClassKey() string 9 RefClassCatalog() string 10 RefClassType() string 11 RefDispose() 12 RefData() map[string]interface{} 13 } 14 15 type IObject interface { 16 RefSourceData() map[string]interface{} 17 RefSource(field string) interface{} 18 RefInt(field string) (val int) 19 RefUint(field string) (val uint) 20 RefFloat64(field string) (val float64) 21 RefString(field string) (val string) 22 RefBool(field string) (val bool) 23 RefMap(field string) (r IObject) 24 RefObject(field string) (r IObject) 25 RefArray(field string) (r IArray) 26 RefIsNil() bool 27 RefKeys() (r []string) 28 RefLength() int 29 RefClassCreator(field string, creator func(object IObject) IObject) 30 31 SetRuntimeFloat(field string, val float64) 32 SetRuntimeInt(field string, val int) 33 SetRuntimeBool(field string, val bool) 34 SetRuntimeString(field string, val string) 35 } 36 37 type IArray interface { 38 RefInt(index int) (val int) 39 RefUint(index int) (val uint) 40 RefFloat(index int) (val float64) 41 RefString(index int) (val string) 42 RefBool(index int) (val bool) 43 RefObject(index int) (r IObject) 44 RefLength() int 45 }