udwType

package
v0.0.0-...-f254aa5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDateTimeReflectType

func GetDateTimeReflectType() reflect.Type

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
}

func (*ArrayType) DeleteByPath

func (t *ArrayType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (*ArrayType) GetElemByString

func (t *ArrayType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et UdwType, err error)

func (ArrayType) GetReflectType

func (t ArrayType) GetReflectType() reflect.Type

func (ArrayType) SaveByPath

func (t ArrayType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

type BoolType

type BoolType struct {
	// contains filtered or unexported fields
}

func (BoolType) DeleteByPath

func (t BoolType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (BoolType) FromString

func (t BoolType) FromString(value string) (reflect.Value, error)

func (BoolType) GetReflectType

func (t BoolType) GetReflectType() reflect.Type

func (BoolType) SaveByPath

func (t BoolType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

func (*BoolType) SaveScale

func (t *BoolType) SaveScale(v reflect.Value, value string) error

func (*BoolType) ToString

func (t *BoolType) ToString(v reflect.Value) string

type Context

type Context struct {
	RootType  UdwType
	RootValue reflect.Value
}

func NewContext

func NewContext(ptr interface{}) (*Context, error)

func (*Context) DeleteByPath

func (m *Context) DeleteByPath(path Path) (err error)

func (*Context) GetElemByPath

func (m *Context) GetElemByPath(p Path) (v reflect.Value, t UdwType, err error)

func (*Context) SaveByPath

func (m *Context) SaveByPath(path Path, value string) (err error)

type DateTimeType

type DateTimeType struct {
	// contains filtered or unexported fields
}

func (DateTimeType) DeleteByPath

func (t DateTimeType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (DateTimeType) FromString

func (t DateTimeType) FromString(value string) (reflect.Value, error)

func (DateTimeType) GetReflectType

func (t DateTimeType) GetReflectType() reflect.Type

func (DateTimeType) SaveByPath

func (t DateTimeType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

func (*DateTimeType) SaveScale

func (t *DateTimeType) SaveScale(v reflect.Value, value string) error

func (*DateTimeType) ToString

func (t *DateTimeType) ToString(v reflect.Value) string

type EditableByPathInterface

type EditableByPathInterface interface {
	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 (t FloatType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (FloatType) FromString

func (t FloatType) FromString(value string) (reflect.Value, error)

func (FloatType) GetReflectType

func (t FloatType) GetReflectType() reflect.Type

func (FloatType) SaveByPath

func (t FloatType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

func (*FloatType) SaveScale

func (t *FloatType) SaveScale(v reflect.Value, value string) error

func (*FloatType) ToString

func (t *FloatType) ToString(v reflect.Value) string

type FromStringInterface

type FromStringInterface interface {
	FromString(s string) (reflect.Value, error)
}

type GetElemByStringAndReflectTypeGetterInterface

type GetElemByStringAndReflectTypeGetterInterface interface {
	GetElemByStringInterface
	ReflectTypeGetter
}

type GetElemByStringInterface

type GetElemByStringInterface interface {
	GetElemByString(v reflect.Value, k string) (reflect.Value, UdwType, error)
}

type IntType

type IntType struct {
	// contains filtered or unexported fields
}

func (IntType) DeleteByPath

func (t IntType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (IntType) FromString

func (t IntType) FromString(value string) (reflect.Value, error)

func (IntType) GetReflectType

func (t IntType) GetReflectType() reflect.Type

func (IntType) SaveByPath

func (t IntType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

func (*IntType) SaveScale

func (t *IntType) SaveScale(v reflect.Value, value string) error

func (*IntType) ToString

func (t *IntType) ToString(v reflect.Value) string

type MapType

type MapType struct {
	KeyStringConverter StringConverterInterface
	KeyType            UdwType
	ElemType           UdwType
	// contains filtered or unexported fields
}

func (*MapType) DeleteByPath

func (t *MapType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (*MapType) GetElemByString

func (t *MapType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et UdwType, err error)

func (MapType) GetReflectType

func (t MapType) GetReflectType() reflect.Type

func (*MapType) Init

func (t *MapType) Init() (err error)

func (*MapType) SaveByPath

func (t *MapType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

type Path

type Path []string

func ParsePath

func ParsePath(ps string) Path

func (Path) String

func (p Path) String() string

type PtrType

type PtrType struct {
	// contains filtered or unexported fields
}

func (*PtrType) DeleteByPath

func (t *PtrType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (*PtrType) GetElemByString

func (t *PtrType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et UdwType, err error)

func (PtrType) GetReflectType

func (t PtrType) GetReflectType() reflect.Type

func (*PtrType) SaveByPath

func (t *PtrType) SaveByPath(inV *reflect.Value, path Path, value string) error

type ReflectTypeGetter

type ReflectTypeGetter interface {
	GetReflectType() reflect.Type
}

type SaveScaleInterface

type SaveScaleInterface interface {
	SaveScale(v reflect.Value, value string) error
}

type SliceType

type SliceType struct {
	// contains filtered or unexported fields
}

func (*SliceType) DeleteByPath

func (t *SliceType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (*SliceType) GetElemByString

func (t *SliceType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et UdwType, err error)

func (SliceType) GetReflectType

func (t SliceType) GetReflectType() reflect.Type

func (*SliceType) SaveByPath

func (t *SliceType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

type StringConverterInterface

type StringConverterInterface interface {
	FromStringInterface
	ToStringInterface
}

type StringEnum

type StringEnum interface {
	GetEnumList() []string
}

type StringType

type StringType struct {
	// contains filtered or unexported fields
}

func (StringType) DeleteByPath

func (t StringType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (StringType) FromString

func (t StringType) FromString(value string) (reflect.Value, error)

func (StringType) GetReflectType

func (t StringType) GetReflectType() reflect.Type

func (StringType) SaveByPath

func (t StringType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

func (*StringType) SaveScale

func (t *StringType) SaveScale(v reflect.Value, value string) error

func (*StringType) ToString

func (t *StringType) ToString(v reflect.Value) string

type StructType

type StructType struct {
	// contains filtered or unexported fields
}

func (*StructType) DeleteByPath

func (t *StructType) DeleteByPath(v *reflect.Value, path Path) (err error)

func (*StructType) GetElemByString

func (t *StructType) GetElemByString(v reflect.Value, k string) (ev reflect.Value, et UdwType, err error)

func (StructType) GetReflectType

func (t StructType) GetReflectType() reflect.Type

func (StructType) SaveByPath

func (t StructType) SaveByPath(v *reflect.Value, path Path, value string) (err error)

type ToStringInterface

type ToStringInterface interface {
	ToString(v reflect.Value) string
}

type UdwType

type UdwType interface {
	EditableByPathInterface
	ReflectTypeGetter
}

func TypeOf

func TypeOf(rt reflect.Type) (UdwType, error)

type UdwTypeAndToStringInterface

type UdwTypeAndToStringInterface interface {
	UdwType
	ToStringInterface
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL