Documentation ¶
Index ¶
- Variables
- func IsEnumExist(enum StringEnum) bool
- func IsEnumExistString(enum StringEnum, s string) bool
- type ArrayType
- func (t *ArrayType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t *ArrayType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et KmgType, err error)
- func (t ArrayType) GetReflectType() reflect.Type
- func (t ArrayType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- type BoolType
- func (t BoolType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t BoolType) FromString(value string) (reflect.Value, error)
- func (t BoolType) GetReflectType() reflect.Type
- func (t BoolType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- func (t *BoolType) SaveScale(v reflect.Value, value string) error
- func (t *BoolType) ToString(v reflect.Value) string
- type Context
- type DateTimeType
- func (t DateTimeType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t DateTimeType) FromString(value string) (reflect.Value, error)
- func (t DateTimeType) GetReflectType() reflect.Type
- func (t DateTimeType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- func (t *DateTimeType) SaveScale(v reflect.Value, value string) error
- func (t *DateTimeType) ToString(v reflect.Value) string
- type EditableByPathInterface
- type FloatType
- func (t FloatType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t FloatType) FromString(value string) (reflect.Value, error)
- func (t FloatType) GetReflectType() reflect.Type
- func (t FloatType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- func (t *FloatType) SaveScale(v reflect.Value, value string) error
- func (t *FloatType) ToString(v reflect.Value) string
- type FromStringInterface
- type GetElemByStringAndReflectTypeGetterInterface
- type GetElemByStringInterface
- type IntType
- func (t IntType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t IntType) FromString(value string) (reflect.Value, error)
- func (t IntType) GetReflectType() reflect.Type
- func (t IntType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- func (t *IntType) SaveScale(v reflect.Value, value string) error
- func (t *IntType) ToString(v reflect.Value) string
- type KmgType
- type KmgTypeAndToStringInterface
- type MapType
- func (t *MapType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t *MapType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et KmgType, err error)
- func (t MapType) GetReflectType() reflect.Type
- func (t *MapType) Init() (err error)
- func (t *MapType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- type Path
- type PtrType
- func (t *PtrType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t *PtrType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et KmgType, err error)
- func (t PtrType) GetReflectType() reflect.Type
- func (t *PtrType) SaveByPath(inV *reflect.Value, path Path, value string) error
- type ReflectTypeGetter
- type SaveScaleInterface
- type SliceType
- func (t *SliceType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t *SliceType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et KmgType, err error)
- func (t SliceType) GetReflectType() reflect.Type
- func (t *SliceType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- type StringConverterInterface
- type StringEnum
- type StringType
- func (t StringType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t StringType) FromString(value string) (reflect.Value, error)
- func (t StringType) GetReflectType() reflect.Type
- func (t StringType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- func (t *StringType) SaveScale(v reflect.Value, value string) error
- func (t *StringType) ToString(v reflect.Value) string
- type StructType
- func (t *StructType) DeleteByPath(v *reflect.Value, path Path) (err error)
- func (t *StructType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et KmgType, err error)
- func (t StructType) GetReflectType() reflect.Type
- func (t StructType) SaveByPath(v *reflect.Value, path Path, value string) (err error)
- type ToStringInterface
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func IsEnumExist ¶
func IsEnumExist(enum StringEnum) bool
func IsEnumExistString ¶
func IsEnumExistString(enum StringEnum, s string) bool
Types ¶
type ArrayType ¶
type ArrayType struct {
// contains filtered or unexported fields
}
path -> array index(number)
func (*ArrayType) DeleteByPath ¶
func (*ArrayType) GetElemByString ¶
func (ArrayType) GetReflectType ¶
type BoolType ¶
type BoolType struct {
// contains filtered or unexported fields
}
func (BoolType) DeleteByPath ¶
func (BoolType) GetReflectType ¶
func (BoolType) SaveByPath ¶
type DateTimeType ¶
type DateTimeType struct {
// contains filtered or unexported fields
}
func (DateTimeType) DeleteByPath ¶
func (DateTimeType) FromString ¶
func (DateTimeType) GetReflectType ¶
func (DateTimeType) SaveByPath ¶
type EditableByPathInterface ¶
type EditableByPathInterface interface { // v must not be nil, v.IsValid must be true // every type must consider reflect.Value.CanSet() // every type in the path except least one(include ptr),must eat a path. // try best to create all path, if it is not exist. // if this value can set its own value,set it,if this value can not set its own value,replace v with a new value SaveByPath(v *reflect.Value, path Path, value string) (err error) DeleteByPath(v *reflect.Value, path Path) (err error) }
type FloatType ¶
type FloatType struct {
// contains filtered or unexported fields
}
func (FloatType) DeleteByPath ¶
func (FloatType) GetReflectType ¶
func (FloatType) SaveByPath ¶
type FromStringInterface ¶
type GetElemByStringAndReflectTypeGetterInterface ¶
type GetElemByStringAndReflectTypeGetterInterface interface { GetElemByStringInterface ReflectTypeGetter }
type GetElemByStringInterface ¶
type GetElemByStringInterface interface {
GetElemByString(v reflect.Value, k string) (reflect.Value, KmgType, error)
}
array slice struct map
type IntType ¶
type IntType struct {
// contains filtered or unexported fields
}
func (IntType) DeleteByPath ¶
func (IntType) GetReflectType ¶
func (IntType) SaveByPath ¶
type KmgType ¶
type KmgType interface { EditableByPathInterface ReflectTypeGetter }
type KmgTypeAndToStringInterface ¶
type KmgTypeAndToStringInterface interface { KmgType ToStringInterface }
type MapType ¶
type MapType struct { KeyStringConverter StringConverterInterface KeyType KmgType ElemType KmgType // contains filtered or unexported fields }
path -> key(Key type) key can be bool,string,stringEnum,int,float, map elem CanSet() will be false even if map CanSet false , SetMapIndex will success if elem change(can not set),map must use SetMapIndex to set it..
func (*MapType) DeleteByPath ¶
func (*MapType) GetElemByString ¶
func (MapType) GetReflectType ¶
type PtrType ¶
type PtrType struct {
// contains filtered or unexported fields
}
path -> pass to RefType
func (*PtrType) DeleteByPath ¶
func (*PtrType) GetElemByString ¶
func (PtrType) GetReflectType ¶
type ReflectTypeGetter ¶
type SaveScaleInterface ¶
bool datetime fkref float int string stringEnum
type SliceType ¶
type SliceType struct {
// contains filtered or unexported fields
}
path -> slice index(number)
func (*SliceType) DeleteByPath ¶
func (*SliceType) GetElemByString ¶
func (SliceType) GetReflectType ¶
type StringConverterInterface ¶
type StringConverterInterface interface { FromStringInterface ToStringInterface }
type StringEnum ¶
type StringEnum interface {
GetEnumList() []string //GetEnumList get all list of this type enum ,should only depend on type
}
type StringType ¶
type StringType struct {
// contains filtered or unexported fields
}
func (StringType) DeleteByPath ¶
func (StringType) GetReflectType ¶
func (StringType) SaveByPath ¶
type StructType ¶
type StructType struct {
// contains filtered or unexported fields
}
path -> field name TODO embed field
func (*StructType) DeleteByPath ¶
func (t *StructType) DeleteByPath(v *reflect.Value, path Path) (err error)
func (*StructType) GetElemByString ¶
func (StructType) GetReflectType ¶
type ToStringInterface ¶
Click to show internal directories.
Click to hide internal directories.