Documentation ¶
Overview ¶
Package gmeta provides embedded gometa data feature for struct.
Index ¶
- Constants
- func Data(object interface{}) map[string]string
- func Get(object interface{}, key string) *gvar.Var
- func LoadBeanProxy[T baseiface.IbaseProxy]() T
- func ParseMaps2Models[T any](str string, models *[]T)
- type BaseEntity
- func (self *BaseEntity) Autowire()
- func (self *BaseEntity) Bind()
- func (self *BaseEntity) BindUp(key string, load baseiface.LoadBean)
- func (self *BaseEntity) Check() error
- func (self *BaseEntity) Clone() any
- func (self *BaseEntity) ContainsStru(v any) bool
- func (self *BaseEntity) CopyWithOption(from interface{})
- func (self *BaseEntity) FindBinding(key string) baseiface.LoadBean
- func (self *BaseEntity) FindNameOfIface() string
- func (self *BaseEntity) FromJson(body []byte) any
- func (self *BaseEntity) HandleCheck() error
- func (self *BaseEntity) Id2Str(id int64) string
- func (self *BaseEntity) IfAutowire() bool
- func (self *BaseEntity) Init()
- func (self *BaseEntity) InitChildNilPtr()
- func (self *BaseEntity) InitProxy(some any)
- func (self *BaseEntity) JsonFromStr(v string) string
- func (self *BaseEntity) Log()
- func (self *BaseEntity) Parse2Map() (map[string]any, error)
- func (self *BaseEntity) ParseTags(tagkey string) map[string]string
- func (self *BaseEntity) Shutdown()
- func (self *BaseEntity) Single() bool
- func (self *BaseEntity) Str2Int(from string) int
- func (self *BaseEntity) String() string
- func (self *BaseEntity) ToJson() string
- func (self *BaseEntity) ToJsonBytes() []byte
- func (self *BaseEntity) ToJsonStr() string
- func (self *BaseEntity) ToPrettyString() string
- func (self *BaseEntity) ToString() string
- func (entity *BaseEntity) ToStru(out any)
- func (self *BaseEntity) ValueFrom(value any)
- func (self *BaseEntity) ValueOf(that interface{})
- type BaseEntityIndex
- type BaseEntitySingle
- func (self *BaseEntitySingle) Autowire()
- func (self *BaseEntitySingle) ContainsStru(v any) bool
- func (self *BaseEntitySingle) IfAutowire() bool
- func (bes *BaseEntitySingle) InitProxy(some any)
- func (self *BaseEntitySingle) ParseTags(tagkey string) map[string]string
- func (bes *BaseEntitySingle) Single() bool
- type BaseEntityTable
- type BaseProxy
- func (self *BaseProxy) Autowire()
- func (this *BaseProxy) Clone() any
- func (self *BaseProxy) ContainsStru(childStru any) bool
- func (this *BaseProxy) CopyWithOption(from interface{})
- func (this *BaseProxy) FindNameOfIface() string
- func (this *BaseProxy) FromJson(body []byte) interface{}
- func (this *BaseProxy) FromJsonOut(body []byte, out interface{})
- func (this *BaseProxy) HandleCheck() error
- func (self *BaseProxy) IfAutowire() bool
- func (this *BaseProxy) Init()
- func (self *BaseProxy) InitChildNilPtr()
- func (this *BaseProxy) JsonFromStr(v string) string
- func (this *BaseProxy) Log()
- func (self *BaseProxy) Parse2Map() (map[string]any, error)
- func (self *BaseProxy) ParseTags(tagkey string) map[string]string
- func (this *BaseProxy) Shutdown()
- func (this *BaseProxy) String() string
- func (this *BaseProxy) ToJson() string
- func (this *BaseProxy) ToJsonBytes() []byte
- func (this *BaseProxy) ToJsonStr() string
- func (this *BaseProxy) ToPrettyString() string
- func (this *BaseProxy) ToString() string
- func (self *BaseProxy) ToStru(out any)
- func (this *BaseProxy) ValueFrom(from interface{})
- func (this *BaseProxy) ValueOf(another interface{})
- type Gometa
- type IchubError
- type IchubResult
- func FailResult(msg string) *IchubResult
- func NewIchubResult() *IchubResult
- func ParseIchubResult(body []byte) *IchubResult
- func ResultCodeMsg(code int, msg string) *IchubResult
- func ResultError(err error) *IchubResult
- func ResultFailErr(err error) *IchubResult
- func ResultFailMsg(msg string) *IchubResult
- func ResultSuccessData(data interface{}) *IchubResult
- func ValueOf(resp *resty.Response) *IchubResult
- func (self *IchubResult) As(out interface{}) *IchubResult
- func (self *IchubResult) Check() error
- func (self *IchubResult) CheckCode(suite suite.Suite, code int)
- func (self *IchubResult) CheckExp(suite suite.Suite, keyVal string)
- func (self *IchubResult) CheckValueByKey(key string, expect interface{}) bool
- func (self *IchubResult) Checks(suite *suite.Suite, keyVals string)
- func (self *IchubResult) CodeMsg(code int, msg string) *IchubResult
- func (self *IchubResult) DataIfMap() map[string]interface{}
- func (self *IchubResult) DataIfResultParams() *IchubResultParams
- func (self *IchubResult) Fail() *IchubResult
- func (self *IchubResult) FailMsg(msg string) *IchubResult
- func (self *IchubResult) From(body []byte) (*IchubResult, error)
- func (self *IchubResult) GetData() any
- func (self *IchubResult) GetDbResult() map[string]any
- func (self *IchubResult) GetEsResult() map[string]any
- func (self *IchubResult) Init()
- func (self *IchubResult) IsFailed() bool
- func (self *IchubResult) IsSuccess() bool
- func (self *IchubResult) ParseData(model interface{}) *IchubResult
- func (self *IchubResult) ParseDataBytes(model interface{}) *IchubResult
- func (self *IchubResult) ParseList2Stru(model any) *IchubResult
- func (self *IchubResult) ParseRemote(model interface{}) *IchubResult
- func (self *IchubResult) ParseResult() *IchubResult
- func (self *IchubResult) Result2Error() error
- func (self *IchubResult) ResultJson(c *gin.Context)
- func (self *IchubResult) ResultOk(c *gin.Context)
- func (self *IchubResult) SetData(s interface{})
- func (self *IchubResult) Shutdown()
- func (self *IchubResult) Success() *IchubResult
- func (self *IchubResult) SuccessData(data interface{}) *IchubResult
- func (self *IchubResult) SuccessMessage(msg string, data interface{}) *IchubResult
- func (self *IchubResult) To(out interface{})
- func (self *IchubResult) ValueByKey(key string) any
- func (self *IchubResult) ValueOfMap(key string) *gvar.Var
- type IchubResultParam
- func (p *IchubResultParam) CheckType(i interface{}) string
- func (p *IchubResultParam) CheckTypeParam() string
- func (p *IchubResultParam) From(value interface{}) *IchubResultParam
- func (this *IchubResultParam) FromJsonOut(out interface{})
- func (p *IchubResultParam) IfBool() bool
- func (p *IchubResultParam) IfByte() bool
- func (p *IchubResultParam) IfFloat32() bool
- func (p *IchubResultParam) IfFloat64() bool
- func (p *IchubResultParam) IfInt() bool
- func (p *IchubResultParam) IfInt16() bool
- func (p *IchubResultParam) IfInt32() bool
- func (p *IchubResultParam) IfInt64() bool
- func (p *IchubResultParam) IfInt8() bool
- func (p *IchubResultParam) IfStr() bool
- func (p *IchubResultParam) IfString() bool
- func (p *IchubResultParam) IfUInt16() bool
- func (p *IchubResultParam) IfUInt32() bool
- func (p *IchubResultParam) IfUInt64() bool
- func (p *IchubResultParam) IfUInt8() bool
- func (p *IchubResultParam) SetValue(value interface{})
- func (p *IchubResultParam) String() string
- func (p *IchubResultParam) ToBool() (ivalue bool)
- func (p *IchubResultParam) ToByte() byte
- func (p *IchubResultParam) ToBytes() []byte
- func (p *IchubResultParam) ToFloat32() (ivalue float32)
- func (p *IchubResultParam) ToFloat64() (ivalue float64)
- func (p *IchubResultParam) ToInt() int
- func (p *IchubResultParam) ToInt16() (ivalue int16)
- func (p *IchubResultParam) ToInt32() (ivalue int32)
- func (p *IchubResultParam) ToInt64() (ivalue int64)
- func (p *IchubResultParam) ToInt8() (ivalue int8)
- func (p *IchubResultParam) ToString() string
- func (p *IchubResultParam) ToUIn8() uint8
- func (p *IchubResultParam) ToUInt() uint
- func (p *IchubResultParam) ToUInt16() (ivalue uint16)
- func (p *IchubResultParam) ToUInt32() (ivalue uint32)
- func (p *IchubResultParam) ToUInt64() uint64
- func (p *IchubResultParam) Value() any
- type IchubResultParams
- func (p *IchubResultParams) GetMap(key string) map[string]any
- func (p *IchubResultParams) GetParam(key string) *IchubResultParam
- func (p *IchubResultParams) GetParams(key string) *IchubResultParams
- func (p *IchubResultParams) SetParam(key string, value interface{})
- func (this *IchubResultParams) ValueOf(m map[string]interface{}) *IchubResultParams
- type IchubResults
- func (results *IchubResults) CheckCode(suite suite.Suite, code int)
- func (results *IchubResults) Fail() *IchubResults
- func (results *IchubResults) FailMessage(msg string) *IchubResults
- func (results *IchubResults) FromJson(body []byte) (*IchubResults, error)
- func (results *IchubResults) GetData() []*IchubResult
- func (results *IchubResults) Log()
- func (results *IchubResults) SetData(s []*IchubResult)
- func (results *IchubResults) String() (s string)
- func (results *IchubResults) Success() *IchubResults
- func (results *IchubResults) SuccessData(data []*IchubResult) *IchubResults
- func (results *IchubResults) SuccessMessage(msg string, datas []*IchubResult) *IchubResults
- func (results *IchubResults) ToString() string
- func (results *IchubResults) ValueOf(index int) *IchubResult
Constants ¶
View Source
const CODE_FAIL = CODE_SERVER_ERR
View Source
const CODE_NOFOUND_RECORD = 510
View Source
const CODE_REQUEST_BAD = 400
View Source
const CODE_SERVER_ERR = 500
View Source
const CODE_SUCCESS = 200
Variables ¶
This section is empty.
Functions ¶
func LoadBeanProxy ¶
func LoadBeanProxy[T baseiface.IbaseProxy]() T
func ParseMaps2Models ¶
Types ¶
type BaseEntity ¶
type BaseEntity struct { Proxy func() *BaseProxy `json:"-" gorm:"-"` Bindings map[string]baseiface.LoadBean `json:"-" gorm:"-"` RootDir string `json:"-" gorm:"-"` Ver string `json:"-" gorm:"-"` }
func NewBaseEntity ¶
func NewBaseEntity() *BaseEntity
func (*BaseEntity) Autowire ¶
func (self *BaseEntity) Autowire()
func (*BaseEntity) Bind ¶
func (self *BaseEntity) Bind()
func (*BaseEntity) Check ¶
func (self *BaseEntity) Check() error
func (*BaseEntity) Clone ¶
func (self *BaseEntity) Clone() any
func (*BaseEntity) ContainsStru ¶
func (self *BaseEntity) ContainsStru(v any) bool
func (*BaseEntity) CopyWithOption ¶
func (self *BaseEntity) CopyWithOption(from interface{})
func (*BaseEntity) FindBinding ¶
func (self *BaseEntity) FindBinding(key string) baseiface.LoadBean
func (*BaseEntity) FindNameOfIface ¶
func (self *BaseEntity) FindNameOfIface() string
func (*BaseEntity) FromJson ¶
func (self *BaseEntity) FromJson(body []byte) any
func (*BaseEntity) HandleCheck ¶
func (self *BaseEntity) HandleCheck() error
func (*BaseEntity) Id2Str ¶
func (self *BaseEntity) Id2Str(id int64) string
func (*BaseEntity) IfAutowire ¶
func (self *BaseEntity) IfAutowire() bool
func (*BaseEntity) Init ¶
func (self *BaseEntity) Init()
func (*BaseEntity) InitChildNilPtr ¶
func (self *BaseEntity) InitChildNilPtr()
func (*BaseEntity) InitProxy ¶
func (self *BaseEntity) InitProxy(some any)
func (*BaseEntity) JsonFromStr ¶
func (self *BaseEntity) JsonFromStr(v string) string
func (*BaseEntity) Log ¶
func (self *BaseEntity) Log()
func (*BaseEntity) Shutdown ¶
func (self *BaseEntity) Shutdown()
func (*BaseEntity) Single ¶
func (self *BaseEntity) Single() bool
func (*BaseEntity) Str2Int ¶
func (self *BaseEntity) Str2Int(from string) int
func (*BaseEntity) String ¶
func (self *BaseEntity) String() string
func (*BaseEntity) ToJson ¶
func (self *BaseEntity) ToJson() string
func (*BaseEntity) ToJsonBytes ¶
func (self *BaseEntity) ToJsonBytes() []byte
func (*BaseEntity) ToJsonStr ¶
func (self *BaseEntity) ToJsonStr() string
func (*BaseEntity) ToPrettyString ¶
func (self *BaseEntity) ToPrettyString() string
func (*BaseEntity) ToString ¶
func (self *BaseEntity) ToString() string
func (*BaseEntity) ToStru ¶
func (entity *BaseEntity) ToStru(out any)
func (*BaseEntity) ValueFrom ¶
func (self *BaseEntity) ValueFrom(value any)
func (*BaseEntity) ValueOf ¶
func (self *BaseEntity) ValueOf(that interface{})
type BaseEntityIndex ¶
type BaseEntityIndex struct {
BaseEntity
}
func (BaseEntityIndex) GetMapping ¶
func (b BaseEntityIndex) GetMapping() string
func (BaseEntityIndex) PkeyName ¶
func (b BaseEntityIndex) PkeyName() string
func (BaseEntityIndex) PkeyValue ¶
func (b BaseEntityIndex) PkeyValue() any
func (BaseEntityIndex) TableName ¶
func (b BaseEntityIndex) TableName() string
type BaseEntitySingle ¶
type BaseEntitySingle struct {
BaseEntity
}
func (*BaseEntitySingle) Autowire ¶
func (self *BaseEntitySingle) Autowire()
func (*BaseEntitySingle) ContainsStru ¶
func (self *BaseEntitySingle) ContainsStru(v any) bool
func (*BaseEntitySingle) IfAutowire ¶
func (self *BaseEntitySingle) IfAutowire() bool
func (*BaseEntitySingle) InitProxy ¶
func (bes *BaseEntitySingle) InitProxy(some any)
func (*BaseEntitySingle) ParseTags ¶
func (self *BaseEntitySingle) ParseTags(tagkey string) map[string]string
func (*BaseEntitySingle) Single ¶
func (bes *BaseEntitySingle) Single() bool
type BaseEntityTable ¶
type BaseEntityTable struct {
BaseEntity
}
func (BaseEntityTable) AutoMigrate ¶
func (b BaseEntityTable) AutoMigrate() string
func (BaseEntityTable) PkeyName ¶
func (b BaseEntityTable) PkeyName() string
func (BaseEntityTable) PkeyValue ¶
func (b BaseEntityTable) PkeyValue() any
func (BaseEntityTable) TableName ¶
func (b BaseEntityTable) TableName() string
type BaseProxy ¶
type BaseProxy struct {
Some any
}
func NewBaseProxy ¶
func (*BaseProxy) ContainsStru ¶
func (*BaseProxy) CopyWithOption ¶
func (this *BaseProxy) CopyWithOption(from interface{})
func (*BaseProxy) FindNameOfIface ¶
func (*BaseProxy) FromJsonOut ¶
func (*BaseProxy) HandleCheck ¶
func (*BaseProxy) IfAutowire ¶
func (*BaseProxy) InitChildNilPtr ¶
func (self *BaseProxy) InitChildNilPtr()
func (self *BaseEntity) ParseTags1(tagkey string) map[string]string { if self.Proxy != nil { return self.Proxy().ParseTags(tagkey) } return nil }
func (*BaseProxy) JsonFromStr ¶
func (*BaseProxy) ToJsonBytes ¶
func (*BaseProxy) ToPrettyString ¶
type Gometa ¶
type Gometa struct { BaseEntity // contains filtered or unexported fields }
Gometa is used as an embedded attribute for struct to enabled metadata feature.
func (*Gometa) SetAutowired ¶
type IchubError ¶
func NewIchubError ¶
func NewIchubError(code int, msg string) *IchubError
func NewIchubErrorServer ¶
func NewIchubErrorServer() *IchubError
func (*IchubError) Error ¶
func (this *IchubError) Error() string
type IchubResult ¶
type IchubResult struct { BaseEntity `json:"baseEntity"` //返回码 Code int `json:"code" json:"code,omitempty"` //信息 Msg string `json:"msg" json:"msg,omitempty"` //数据 Data interface{} `json:"data" json:"data,omitempty"` //请求id RequestId string `json:"request_id,omitempty" json:"requestId,omitempty"` //请求地址 Hosturl string `json:"hosturl,omitempty" json:"hosturl,omitempty"` CmdTypeName string `json:"cmd_type_name,omitempty"` }
func FailResult ¶
func FailResult(msg string) *IchubResult
func NewIchubResult ¶
func NewIchubResult() *IchubResult
func ParseIchubResult ¶
func ParseIchubResult(body []byte) *IchubResult
func ResultCodeMsg ¶
func ResultCodeMsg(code int, msg string) *IchubResult
func ResultError ¶
func ResultError(err error) *IchubResult
func ResultFailErr ¶
func ResultFailErr(err error) *IchubResult
func ResultFailMsg ¶
func ResultFailMsg(msg string) *IchubResult
func ResultSuccessData ¶
func ResultSuccessData(data interface{}) *IchubResult
func ValueOf ¶
func ValueOf(resp *resty.Response) *IchubResult
func (*IchubResult) As ¶
func (self *IchubResult) As(out interface{}) *IchubResult
func (*IchubResult) Check ¶
func (self *IchubResult) Check() error
func (*IchubResult) CheckValueByKey ¶
func (self *IchubResult) CheckValueByKey(key string, expect interface{}) bool
func (*IchubResult) Checks ¶
func (self *IchubResult) Checks(suite *suite.Suite, keyVals string)
keyVal : "Pay=12|l=2"
func (*IchubResult) CodeMsg ¶
func (self *IchubResult) CodeMsg(code int, msg string) *IchubResult
func (*IchubResult) DataIfMap ¶
func (self *IchubResult) DataIfMap() map[string]interface{}
func (*IchubResult) DataIfResultParams ¶
func (self *IchubResult) DataIfResultParams() *IchubResultParams
func (*IchubResult) Fail ¶
func (self *IchubResult) Fail() *IchubResult
func (*IchubResult) FailMsg ¶
func (self *IchubResult) FailMsg(msg string) *IchubResult
func (*IchubResult) From ¶
func (self *IchubResult) From(body []byte) (*IchubResult, error)
func (*IchubResult) GetData ¶
func (self *IchubResult) GetData() any
func (*IchubResult) GetDbResult ¶
func (self *IchubResult) GetDbResult() map[string]any
func (*IchubResult) GetEsResult ¶
func (self *IchubResult) GetEsResult() map[string]any
func (*IchubResult) Init ¶
func (self *IchubResult) Init()
func (*IchubResult) IsFailed ¶
func (self *IchubResult) IsFailed() bool
func (*IchubResult) IsSuccess ¶
func (self *IchubResult) IsSuccess() bool
func (*IchubResult) ParseData ¶
func (self *IchubResult) ParseData(model interface{}) *IchubResult
func (*IchubResult) ParseDataBytes ¶
func (self *IchubResult) ParseDataBytes(model interface{}) *IchubResult
func (*IchubResult) ParseList2Stru ¶
func (self *IchubResult) ParseList2Stru(model any) *IchubResult
func (*IchubResult) ParseRemote ¶
func (self *IchubResult) ParseRemote(model interface{}) *IchubResult
func (*IchubResult) ParseResult ¶
func (self *IchubResult) ParseResult() *IchubResult
func (*IchubResult) Result2Error ¶
func (self *IchubResult) Result2Error() error
func (*IchubResult) ResultJson ¶
func (self *IchubResult) ResultJson(c *gin.Context)
func (*IchubResult) ResultOk ¶
func (self *IchubResult) ResultOk(c *gin.Context)
func (*IchubResult) SetData ¶
func (self *IchubResult) SetData(s interface{})
func (*IchubResult) Shutdown ¶
func (self *IchubResult) Shutdown()
func (*IchubResult) Success ¶
func (self *IchubResult) Success() *IchubResult
func (*IchubResult) SuccessData ¶
func (self *IchubResult) SuccessData(data interface{}) *IchubResult
func (*IchubResult) SuccessMessage ¶
func (self *IchubResult) SuccessMessage(msg string, data interface{}) *IchubResult
func (*IchubResult) To ¶
func (self *IchubResult) To(out interface{})
func (*IchubResult) ValueByKey ¶
func (self *IchubResult) ValueByKey(key string) any
func (*IchubResult) ValueOfMap ¶
func (self *IchubResult) ValueOfMap(key string) *gvar.Var
type IchubResultParam ¶
type IchubResultParam struct { BaseEntity // contains filtered or unexported fields }
@Title 文件名称: ichub_param.go @Description 描述: 有芯规则引擎执行的参数值对象
应该进行值类型转换,转成string,再转成各类型
@Author 作者: leijianming@163.com 时间(2024-02-18 22:38:21) @Update 作者: leijianming@163.com 时间(2024-02-18 22:38:21)
规则体支持的基础数据类型 string bool int, int8, int16, int32, int64 uint uint8, uint16,uint32, uint64 float32 float64
func NewIchubResultParam ¶
func NewIchubResultParam(value interface{}) *IchubResultParam
func (*IchubResultParam) CheckType ¶
func (p *IchubResultParam) CheckType(i interface{}) string
func (*IchubResultParam) CheckTypeParam ¶
func (p *IchubResultParam) CheckTypeParam() string
func (*IchubResultParam) From ¶
func (p *IchubResultParam) From(value interface{}) *IchubResultParam
func (*IchubResultParam) FromJsonOut ¶
func (this *IchubResultParam) FromJsonOut(out interface{})
func (*IchubResultParam) IfBool ¶
func (p *IchubResultParam) IfBool() bool
func (*IchubResultParam) IfByte ¶
func (p *IchubResultParam) IfByte() bool
func (*IchubResultParam) IfFloat32 ¶
func (p *IchubResultParam) IfFloat32() bool
func (*IchubResultParam) IfFloat64 ¶
func (p *IchubResultParam) IfFloat64() bool
func (*IchubResultParam) IfInt ¶
func (p *IchubResultParam) IfInt() bool
func (*IchubResultParam) IfInt16 ¶
func (p *IchubResultParam) IfInt16() bool
func (*IchubResultParam) IfInt32 ¶
func (p *IchubResultParam) IfInt32() bool
func (*IchubResultParam) IfInt64 ¶
func (p *IchubResultParam) IfInt64() bool
func (*IchubResultParam) IfInt8 ¶
func (p *IchubResultParam) IfInt8() bool
func (*IchubResultParam) IfStr ¶
func (p *IchubResultParam) IfStr() bool
func (*IchubResultParam) IfString ¶
func (p *IchubResultParam) IfString() bool
func (*IchubResultParam) IfUInt16 ¶
func (p *IchubResultParam) IfUInt16() bool
func (*IchubResultParam) IfUInt32 ¶
func (p *IchubResultParam) IfUInt32() bool
func (*IchubResultParam) IfUInt64 ¶
func (p *IchubResultParam) IfUInt64() bool
func (*IchubResultParam) IfUInt8 ¶
func (p *IchubResultParam) IfUInt8() bool
func (*IchubResultParam) SetValue ¶
func (p *IchubResultParam) SetValue(value interface{})
func (*IchubResultParam) String ¶
func (p *IchubResultParam) String() string
func (*IchubResultParam) ToBool ¶
func (p *IchubResultParam) ToBool() (ivalue bool)
func (*IchubResultParam) ToByte ¶
func (p *IchubResultParam) ToByte() byte
func (*IchubResultParam) ToBytes ¶
func (p *IchubResultParam) ToBytes() []byte
func (*IchubResultParam) ToFloat32 ¶
func (p *IchubResultParam) ToFloat32() (ivalue float32)
func (*IchubResultParam) ToFloat64 ¶
func (p *IchubResultParam) ToFloat64() (ivalue float64)
func (*IchubResultParam) ToInt ¶
func (p *IchubResultParam) ToInt() int
func (*IchubResultParam) ToInt16 ¶
func (p *IchubResultParam) ToInt16() (ivalue int16)
func (*IchubResultParam) ToInt32 ¶
func (p *IchubResultParam) ToInt32() (ivalue int32)
func (*IchubResultParam) ToInt64 ¶
func (p *IchubResultParam) ToInt64() (ivalue int64)
func (*IchubResultParam) ToInt8 ¶
func (p *IchubResultParam) ToInt8() (ivalue int8)
func (*IchubResultParam) ToString ¶
func (p *IchubResultParam) ToString() string
func (*IchubResultParam) ToUIn8 ¶
func (p *IchubResultParam) ToUIn8() uint8
func (*IchubResultParam) ToUInt ¶
func (p *IchubResultParam) ToUInt() uint
func (*IchubResultParam) ToUInt16 ¶
func (p *IchubResultParam) ToUInt16() (ivalue uint16)
func (*IchubResultParam) ToUInt32 ¶
func (p *IchubResultParam) ToUInt32() (ivalue uint32)
func (*IchubResultParam) Value ¶
func (p *IchubResultParam) Value() any
type IchubResultParams ¶
type IchubResultParams struct { Params map[string]any `json:"params"` BaseEntity }
func NewIchubResultParams ¶
func NewIchubResultParams() *IchubResultParams
func (*IchubResultParams) GetParam ¶
func (p *IchubResultParams) GetParam(key string) *IchubResultParam
func (*IchubResultParams) GetParams ¶
func (p *IchubResultParams) GetParams(key string) *IchubResultParams
func (*IchubResultParams) SetParam ¶
func (p *IchubResultParams) SetParam(key string, value interface{})
func (*IchubResultParams) ValueOf ¶
func (this *IchubResultParams) ValueOf(m map[string]interface{}) *IchubResultParams
type IchubResults ¶
type IchubResults struct { BaseEntity // 返回码 Code int `json:"code"` // 状态消息 Msg string `json:"msg"` // 返回数据 Data []*IchubResult `json:"data,omitempty"` // 请求ID RequestId string `json:"request_id,omitempty"` Hosturl string `json:"hosturl,omitempty"` }
func BatchSuccessResult ¶
func BatchSuccessResult(batchData []any) *IchubResults
func NewIchubResults ¶
func NewIchubResults() *IchubResults
func ParseIchubResults ¶
func ParseIchubResults(body []byte) *IchubResults
func (*IchubResults) CheckCode ¶
func (results *IchubResults) CheckCode(suite suite.Suite, code int)
func (*IchubResults) Fail ¶
func (results *IchubResults) Fail() *IchubResults
func (*IchubResults) FailMessage ¶
func (results *IchubResults) FailMessage(msg string) *IchubResults
func (*IchubResults) FromJson ¶
func (results *IchubResults) FromJson(body []byte) (*IchubResults, error)
func DataOfIndex(1)
func (*IchubResults) GetData ¶
func (results *IchubResults) GetData() []*IchubResult
func (*IchubResults) Log ¶
func (results *IchubResults) Log()
func (*IchubResults) SetData ¶
func (results *IchubResults) SetData(s []*IchubResult)
func (*IchubResults) String ¶
func (results *IchubResults) String() (s string)
func (*IchubResults) Success ¶
func (results *IchubResults) Success() *IchubResults
func (*IchubResults) SuccessData ¶
func (results *IchubResults) SuccessData(data []*IchubResult) *IchubResults
func (*IchubResults) SuccessMessage ¶
func (results *IchubResults) SuccessMessage(msg string, datas []*IchubResult) *IchubResults
func (*IchubResults) ToString ¶
func (results *IchubResults) ToString() string
func (*IchubResults) ValueOf ¶
func (results *IchubResults) ValueOf(index int) *IchubResult
Click to show internal directories.
Click to hide internal directories.