remote

package
Version: v0.0.0-...-7cf166a Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendSliceValue

func AppendSliceValue(sliceVal model.Value, vVal model.Value) (ret model.Value, err error)

func CompareObjectValue

func CompareObjectValue(l, r *ObjectValue) bool

func DecodeValue

func DecodeValue(tVal interface{}, tType model.Type, mCache model.Cache) (ret model.Value, err error)

func ElemDependValue

func ElemDependValue(vVal model.Value) (ret []model.Value, err error)

func EncodeObject

func EncodeObject(objPtr *Object) (ret []byte, err error)

func EncodeObjectValue

func EncodeObjectValue(objVal *ObjectValue) (ret []byte, err error)

EncodeObjectValue encode objectValue to []byte

func EncodeSliceObjectValue

func EncodeSliceObjectValue(objVal *SliceObjectValue) (ret []byte, err error)

EncodeSliceObjectValue encode slice objectValue to []byte

func EncodeValue

func EncodeValue(tVal model.Value, tType model.Type, mCache model.Cache) (ret interface{}, err error)

func GetEntityModel

func GetEntityModel(entity interface{}) (ret model.Model, err error)

func GetEntityType

func GetEntityType(entity interface{}) (ret model.Type, err error)

func GetEntityValue

func GetEntityValue(entity interface{}) (ret model.Value, err error)

func GetHelper

func GetHelper() helper.Helper

func SetModelValue

func SetModelValue(vModel model.Model, vVal model.Value) (ret model.Model, err error)

Types

type Item

type Item struct {
	Index int    `json:"index"`
	Name  string `json:"name"`

	Tag  *TagImpl  `json:"tag"`
	Type *TypeImpl `json:"type"`
	// contains filtered or unexported fields
}

Item Item

func (*Item) GetIndex

func (s *Item) GetIndex() (ret int)

GetIndex GetIndex

func (*Item) GetName

func (s *Item) GetName() string

GetName GetName

func (*Item) GetTag

func (s *Item) GetTag() (ret model.Tag)

GetTag GetTag

func (*Item) GetType

func (s *Item) GetType() (ret model.Type)

GetEntityType GetEntityType

func (*Item) GetValue

func (s *Item) GetValue() (ret model.Value)

GetEntityValue GetEntityValue

func (*Item) IsPrimary

func (s *Item) IsPrimary() bool

IsPrimary IsPrimary

func (*Item) SetValue

func (s *Item) SetValue(val model.Value) (err error)

SetValue SetValue

type ItemValue

type ItemValue struct {
	Name  string      `json:"name"`
	Value interface{} `json:"value"`
}

ItemValue item value

func ConvertItem

func ConvertItem(val *ItemValue) (ret *ItemValue, err error)

ConvertItem convert ItemValue

type Object

type Object struct {
	Name    string  `json:"name"`
	PkgPath string  `json:"pkgPath"`
	IsPtr   bool    `json:"isPtr"`
	Items   []*Item `json:"items"`
}

Object Object

func DecodeObject

func DecodeObject(data []byte) (ret *Object, err error)

func GetObject

func GetObject(entity interface{}) (ret *Object, err error)

GetObject GetObject

func (*Object) Copy

func (s *Object) Copy() (ret model.Model)

Copy Copy

func (*Object) Dump

func (s *Object) Dump() (ret string)

func (*Object) GetField

func (s *Object) GetField(name string) (ret model.Field)

func (*Object) GetFields

func (s *Object) GetFields() (ret model.Fields)

GetFields GetFields

func (*Object) GetName

func (s *Object) GetName() (ret string)

GetName GetName

func (*Object) GetPkgPath

func (s *Object) GetPkgPath() (ret string)

GetPkgPath GetPkgPath

func (*Object) GetPrimaryField

func (s *Object) GetPrimaryField() (ret model.Field)

GetPrimaryField GetPrimaryField

func (*Object) Interface

func (s *Object) Interface(ptrValue bool) (ret interface{})

Interface Interface

func (*Object) IsPtrValue

func (s *Object) IsPtrValue() bool

IsPtrValue isPtrValue

func (*Object) SetFieldValue

func (s *Object) SetFieldValue(name string, val model.Value) (err error)

UpdateFieldValue UpdateFieldValue

type ObjectValue

type ObjectValue struct {
	Name    string       `json:"name"`
	PkgPath string       `json:"pkgPath"`
	IsPtr   bool         `json:"isPtr"`
	Items   []*ItemValue `json:"items"`
}

ObjectValue Object value

func ConvertObjectValue

func ConvertObjectValue(objVal *ObjectValue) (ret *ObjectValue, err error)

ConvertObjectValue convert object value

func DecodeObjectValue

func DecodeObjectValue(data []byte) (ret *ObjectValue, err error)

DecodeObjectValue decode objectValue

func GetObjectValue

func GetObjectValue(entity interface{}) (ret *ObjectValue, err error)

GetObjectValue get object value

func (*ObjectValue) GetName

func (s *ObjectValue) GetName() string

GetName get object name

func (*ObjectValue) GetPkgPath

func (s *ObjectValue) GetPkgPath() string

GetPkgPath get pkg path

func (*ObjectValue) IsAssigned

func (s *ObjectValue) IsAssigned() (ret bool)

IsAssigned is assigned value

func (*ObjectValue) IsPtrValue

func (s *ObjectValue) IsPtrValue() bool

IsPtrValue isPtrValue

type SliceObjectValue

type SliceObjectValue struct {
	Name      string         `json:"name"`
	PkgPath   string         `json:"pkgPath"`
	IsPtr     bool           `json:"isPtr"`
	IsElemPtr bool           `json:"isElemPtr"`
	Values    []*ObjectValue `json:"values"`
}

SliceObjectValue slice object value

func ConvertSliceObjectValue

func ConvertSliceObjectValue(objVal *SliceObjectValue) (ret *SliceObjectValue, err error)

func DecodeSliceObjectValue

func DecodeSliceObjectValue(data []byte) (ret *SliceObjectValue, err error)

DecodeSliceObjectValue decode objectValue

func GetSliceObjectValue

func GetSliceObjectValue(sliceEntity interface{}) (ret *SliceObjectValue, err error)

GetSliceObjectValue get slice object value

func (*SliceObjectValue) GetName

func (s *SliceObjectValue) GetName() string

GetName get object name

func (*SliceObjectValue) GetPkgPath

func (s *SliceObjectValue) GetPkgPath() string

GetPkgPath get pkg path

func (*SliceObjectValue) IsAssigned

func (s *SliceObjectValue) IsAssigned() (ret bool)

IsAssigned is assigned value

func (*SliceObjectValue) IsElemPtrValue

func (s *SliceObjectValue) IsElemPtrValue() bool

IsElemPtr isPtrValue

func (*SliceObjectValue) IsPtrValue

func (s *SliceObjectValue) IsPtrValue() bool

IsPtrValue isPtrValue

type TagImpl

type TagImpl struct {
	Value string `json:"value"`
}

TagImpl TagImpl

func (*TagImpl) GetName

func (s *TagImpl) GetName() (ret string)

GetName Name

func (*TagImpl) IsAutoIncrement

func (s *TagImpl) IsAutoIncrement() (ret bool)

IsAutoIncrement IsAutoIncrement

func (*TagImpl) IsPrimaryKey

func (s *TagImpl) IsPrimaryKey() (ret bool)

IsPrimaryKey IsPrimaryKey

type TypeImpl

type TypeImpl struct {
	Name     string    `json:"name"`
	Value    int       `json:"value"`
	PkgPath  string    `json:"pkgPath"`
	IsPtr    bool      `json:"isPtr"`
	ElemType *TypeImpl `json:"elemType"`
}

TypeImpl TypeImpl

func (*TypeImpl) Elem

func (s *TypeImpl) Elem() model.Type

Elem get element type

func (*TypeImpl) GetName

func (s *TypeImpl) GetName() (ret string)

GetName GetName

func (*TypeImpl) GetPkgPath

func (s *TypeImpl) GetPkgPath() (ret string)

GetPkgPath GetPkgPath

func (*TypeImpl) GetValue

func (s *TypeImpl) GetValue() (ret int)

GetEntityValue GetEntityValue

func (*TypeImpl) Interface

func (s *TypeImpl) Interface() (ret model.Value, err error)

Interface Interface

func (*TypeImpl) IsBasic

func (s *TypeImpl) IsBasic() bool

func (*TypeImpl) IsPtrType

func (s *TypeImpl) IsPtrType() (ret bool)

IsPtrType IsPtrType

type ValueImpl

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

ValueImpl ValueImpl

func (*ValueImpl) Addr

func (s *ValueImpl) Addr() model.Value

func (*ValueImpl) Get

func (s *ValueImpl) Get() (ret reflect.Value)

Get Get

func (*ValueImpl) IsNil

func (s *ValueImpl) IsNil() (ret bool)

IsNil IsNil

func (*ValueImpl) Set

func (s *ValueImpl) Set(val reflect.Value) (err error)

Set Set

Jump to

Keyboard shortcuts

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