Documentation ¶
Index ¶
- Constants
- func LoadBaseEntity() baseiface.ISingleton
- type BaseEntity
- func (this *BaseEntity) AutoInject() bool
- func (this *BaseEntity) Autoload() bool
- func (this *BaseEntity) Bind()
- func (this *BaseEntity) BindUp(key string, load baseiface.LoadBean)
- func (this *BaseEntity) Clone() interface{}
- func (this *BaseEntity) CopyWithOption(from any)
- func (this *BaseEntity) FindBinding(key string) baseiface.LoadBean
- func (this *BaseEntity) FromJsonAny(body []byte) interface{}
- func (this *BaseEntity) Id2Str(id int64) string
- func (this *BaseEntity) InitProxy(some any)
- func (this *BaseEntity) Log()
- func (this *BaseEntity) Single() bool
- func (this *BaseEntity) Str2Int(from string) int
- func (this *BaseEntity) String() string
- func (this *BaseEntity) ToJson() string
- func (this *BaseEntity) ToJsonBytes() []byte
- func (this *BaseEntity) ToPrettyString() string
- func (this *BaseEntity) ToString() string
- func (this *BaseEntity) ValueFrom(from any)
- func (this *BaseEntity) ValueOf(that any)
- type BaseEntitySingle
- type BaseProxy
- func (this *BaseProxy) AutoInject() bool
- func (this *BaseProxy) Autoload() bool
- func (this *BaseProxy) Clone() any
- func (this *BaseProxy) CopyWithOption(from any)
- func (this *BaseProxy) FromJson(body []byte) interface{}
- func (this *BaseProxy) Log()
- func (this *BaseProxy) Single() bool
- func (this *BaseProxy) String() string
- func (this *BaseProxy) ToJson() string
- func (this *BaseProxy) ToJsonBytes() []byte
- func (this *BaseProxy) ToPrettyString() string
- func (this *BaseProxy) ToString() string
- func (this *BaseProxy) ValueFrom(from any)
- func (this *BaseProxy) ValueOf(another interface{})
- 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 ResultFailMsg(msg string) *IchubResult
- func ResultSuccessData(data interface{}) *IchubResult
- func ValueOf(resp *resty.Response) *IchubResult
- func (this *IchubResult) Check(suite suite.Suite, keyVal string)
- func (this *IchubResult) CheckCode(suite suite.Suite, code int)
- func (this *IchubResult) CheckValueByKey(key string, expect any) bool
- func (this *IchubResult) Checks(suite suite.Suite, keyVals string)
- func (this *IchubResult) CodeMsg(code int, msg string) *IchubResult
- func (this *IchubResult) DataIfMap() map[string]interface{}
- func (this *IchubResult) DataIfResultParams() *IchubResultParams
- func (this *IchubResult) Fail() *IchubResult
- func (this *IchubResult) FailMessage(msg string) *IchubResult
- func (this *IchubResult) FailMsg(msg string) *IchubResult
- func (this *IchubResult) FromJson(body []byte) (*IchubResult, error)
- func (this *IchubResult) GetData() any
- func (this *IchubResult) GetDbResult() map[string]any
- func (this *IchubResult) GetEsResult() map[string]any
- func (this *IchubResult) IsSuccess() bool
- func (result *IchubResult) ParseData(model interface{}) *IchubResult
- func (this *IchubResult) ParseRemote(model interface{}) *IchubResult
- func (result *IchubResult) ParseResult() *IchubResult
- func (this *IchubResult) SetData(s any)
- func (this *IchubResult) String() string
- func (this *IchubResult) Success() *IchubResult
- func (this *IchubResult) SuccessData(data any) *IchubResult
- func (this *IchubResult) SuccessMessage(msg string, data any) *IchubResult
- func (this *IchubResult) To(out interface{})
- func (this *IchubResult) ToBytes() []byte
- func (this *IchubResult) ToString() string
- func (this *IchubResult) ValueByKey(key string) any
- type IchubResultParam
- func (p *IchubResultParam) CheckType(i interface{}) string
- func (p *IchubResultParam) CheckTypeParam() string
- func (p *IchubResultParam) From(value any) *IchubResultParam
- 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 any)
- 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() (ivalue 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 any)
- func (this *IchubResultParams) ValueOf(m map[string]any) *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, data []IchubResult) *IchubResults
- func (results *IchubResults) ToString() string
- func (results *IchubResults) ValueOf(index int) *IchubResult
- type JsonResult
- func (result *JsonResult) Fail() *JsonResult
- func (result *JsonResult) FailMessage(msg string) *JsonResult
- func (p *JsonResult) GetData() string
- func (p *JsonResult) SetData(s string)
- func (result *JsonResult) String() string
- func (result *JsonResult) Success() *JsonResult
- func (result *JsonResult) SuccessData(data string) *JsonResult
- func (result *JsonResult) SuccessMessage(msg string, data string) *JsonResult
- func (result *JsonResult) ToString() string
- type PageParam
- type PageResult
- type QueryParam
Constants ¶
View Source
const CODE_FAIL = CODE_SERVER_ERR
View Source
const CODE_NOFOUND_RECORD = 501
View Source
const CODE_REQUEST_BAD = 400
View Source
const CODE_SERVER_ERR = 500
View Source
const CODE_SUCCESS = 200
View Source
const CURRENT = 0
View Source
const PAGE_SIZE = 20
Variables ¶
This section is empty.
Functions ¶
func LoadBaseEntity ¶ added in v1.0.70
func LoadBaseEntity() baseiface.ISingleton
Types ¶
type BaseEntity ¶
type BaseEntity struct { Proxy func() *BaseProxy `json:"-"` Bindings map[string]baseiface.LoadBean `json:"-"` }
func FindBeanBaseEntity ¶ added in v1.0.70
func FindBeanBaseEntity() *BaseEntity
func NewBaseEntity ¶
func NewBaseEntity() *BaseEntity
func (*BaseEntity) AutoInject ¶ added in v1.0.53
func (this *BaseEntity) AutoInject() bool
func (*BaseEntity) Autoload ¶ added in v1.0.53
func (this *BaseEntity) Autoload() bool
func (*BaseEntity) Bind ¶ added in v1.0.80
func (this *BaseEntity) Bind()
func (*BaseEntity) BindUp ¶ added in v1.0.81
func (this *BaseEntity) BindUp(key string, load baseiface.LoadBean)
func (*BaseEntity) Clone ¶
func (this *BaseEntity) Clone() interface{}
func (*BaseEntity) CopyWithOption ¶
func (this *BaseEntity) CopyWithOption(from any)
func (*BaseEntity) FindBinding ¶ added in v1.0.82
func (this *BaseEntity) FindBinding(key string) baseiface.LoadBean
func (*BaseEntity) FromJsonAny ¶ added in v1.0.53
func (this *BaseEntity) FromJsonAny(body []byte) interface{}
func (*BaseEntity) Id2Str ¶
func (this *BaseEntity) Id2Str(id int64) string
func (*BaseEntity) InitProxy ¶
func (this *BaseEntity) InitProxy(some any)
func (*BaseEntity) Log ¶
func (this *BaseEntity) Log()
func (*BaseEntity) Single ¶ added in v1.0.53
func (this *BaseEntity) Single() bool
func (*BaseEntity) Str2Int ¶
func (this *BaseEntity) Str2Int(from string) int
func (*BaseEntity) String ¶
func (this *BaseEntity) String() string
func (*BaseEntity) ToJson ¶
func (this *BaseEntity) ToJson() string
func (*BaseEntity) ToJsonBytes ¶ added in v1.0.51
func (this *BaseEntity) ToJsonBytes() []byte
func (*BaseEntity) ToPrettyString ¶
func (this *BaseEntity) ToPrettyString() string
func (*BaseEntity) ToString ¶
func (this *BaseEntity) ToString() string
func (*BaseEntity) ValueFrom ¶
func (this *BaseEntity) ValueFrom(from any)
func (*BaseEntity) ValueOf ¶
func (this *BaseEntity) ValueOf(that any)
type BaseEntitySingle ¶ added in v1.0.60
type BaseEntitySingle struct {
BaseEntity
}
func (*BaseEntitySingle) Single ¶ added in v1.0.60
func (this *BaseEntitySingle) Single() bool
type BaseProxy ¶
type BaseProxy struct {
Some any
}
func NewBaseProxy ¶
func (*BaseProxy) AutoInject ¶ added in v1.0.53
func (*BaseProxy) CopyWithOption ¶
func (*BaseProxy) ToJsonBytes ¶ added in v1.0.51
func (*BaseProxy) ToPrettyString ¶
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 //返回码 Code int `json:"code,omitempty"` //信息 Msg string `json:"msg,omitempty"` //数据 Data any `json:"data,omitempty"` }
func FailResult ¶
func FailResult(msg string) *IchubResult
func NewIchubResult ¶
func NewIchubResult() *IchubResult
func ParseIchubResult ¶
func ParseIchubResult(body []byte) *IchubResult
func ResultCodeMsg ¶ added in v1.0.102
func ResultCodeMsg(code int, msg string) *IchubResult
func ResultFailMsg ¶ added in v1.0.102
func ResultFailMsg(msg string) *IchubResult
func ResultSuccessData ¶ added in v1.0.102
func ResultSuccessData(data interface{}) *IchubResult
func ValueOf ¶
func ValueOf(resp *resty.Response) *IchubResult
func (*IchubResult) CheckValueByKey ¶
func (this *IchubResult) CheckValueByKey(key string, expect any) bool
func (*IchubResult) Checks ¶
func (this *IchubResult) Checks(suite suite.Suite, keyVals string)
keyVal : "Pay=12|l=2"
func (*IchubResult) CodeMsg ¶
func (this *IchubResult) CodeMsg(code int, msg string) *IchubResult
func (*IchubResult) DataIfMap ¶
func (this *IchubResult) DataIfMap() map[string]interface{}
func (*IchubResult) DataIfResultParams ¶
func (this *IchubResult) DataIfResultParams() *IchubResultParams
func (*IchubResult) Fail ¶
func (this *IchubResult) Fail() *IchubResult
func (*IchubResult) FailMessage ¶
func (this *IchubResult) FailMessage(msg string) *IchubResult
func (*IchubResult) FailMsg ¶ added in v1.0.52
func (this *IchubResult) FailMsg(msg string) *IchubResult
func (*IchubResult) FromJson ¶
func (this *IchubResult) FromJson(body []byte) (*IchubResult, error)
func DataOfIndex(1)
func (*IchubResult) GetData ¶
func (this *IchubResult) GetData() any
func (*IchubResult) GetDbResult ¶
func (this *IchubResult) GetDbResult() map[string]any
func (*IchubResult) GetEsResult ¶
func (this *IchubResult) GetEsResult() map[string]any
func (*IchubResult) IsSuccess ¶ added in v1.0.44
func (this *IchubResult) IsSuccess() bool
func (*IchubResult) ParseData ¶ added in v1.0.53
func (result *IchubResult) ParseData(model interface{}) *IchubResult
func (*IchubResult) ParseRemote ¶ added in v1.0.55
func (this *IchubResult) ParseRemote(model interface{}) *IchubResult
func (*IchubResult) ParseResult ¶ added in v1.0.53
func (result *IchubResult) ParseResult() *IchubResult
func (*IchubResult) SetData ¶
func (this *IchubResult) SetData(s any)
func (*IchubResult) String ¶
func (this *IchubResult) String() string
func (*IchubResult) Success ¶
func (this *IchubResult) Success() *IchubResult
func (*IchubResult) SuccessData ¶
func (this *IchubResult) SuccessData(data any) *IchubResult
func (*IchubResult) SuccessMessage ¶
func (this *IchubResult) SuccessMessage(msg string, data any) *IchubResult
func (*IchubResult) To ¶
func (this *IchubResult) To(out interface{})
func (*IchubResult) ToBytes ¶ added in v1.0.42
func (this *IchubResult) ToBytes() []byte
func (*IchubResult) ToString ¶
func (this *IchubResult) ToString() string
func (*IchubResult) ValueByKey ¶
func (this *IchubResult) ValueByKey(key string) any
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 any) *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 any) *IchubResultParam
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 any)
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) ToUInt64 ¶
func (p *IchubResultParam) ToUInt64() (ivalue uint64)
非int64也支持强制转换
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 any)
func (*IchubResultParams) ValueOf ¶
func (this *IchubResultParams) ValueOf(m map[string]any) *IchubResultParams
type IchubResults ¶
type IchubResults struct { BaseEntity Code int `json:"code"` Msg string `json:"msg"` Data []IchubResult `json:"data,omitempty"` }
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, data []IchubResult) *IchubResults
func (*IchubResults) ToString ¶
func (results *IchubResults) ToString() string
func (*IchubResults) ValueOf ¶
func (results *IchubResults) ValueOf(index int) *IchubResult
type JsonResult ¶
type JsonResult struct { Code int `json:"code"` Msg string `json:"msg"` Data string `json:"data"` BaseEntity }
func NewJsonResult ¶
func NewJsonResult() *JsonResult
func (*JsonResult) Fail ¶
func (result *JsonResult) Fail() *JsonResult
func (*JsonResult) FailMessage ¶
func (result *JsonResult) FailMessage(msg string) *JsonResult
func (*JsonResult) GetData ¶
func (p *JsonResult) GetData() string
func (*JsonResult) SetData ¶
func (p *JsonResult) SetData(s string)
func (*JsonResult) String ¶
func (result *JsonResult) String() string
func (*JsonResult) Success ¶
func (result *JsonResult) Success() *JsonResult
func (*JsonResult) SuccessData ¶
func (result *JsonResult) SuccessData(data string) *JsonResult
func (*JsonResult) SuccessMessage ¶
func (result *JsonResult) SuccessMessage(msg string, data string) *JsonResult
func (*JsonResult) ToString ¶
func (result *JsonResult) ToString() string
type PageParam ¶
type PageResult ¶
type PageResult struct { JsonResult Page PageParam `json:"data"` Data []any `json:"data"` }
func (*PageResult) String ¶
func (pageResult *PageResult) String() string
func (*PageResult) ToString ¶
func (pageResult *PageResult) ToString() string
type QueryParam ¶
type QueryParam struct { Current int `json:"current"` PageSize int `json:"page_size"` OrderBys string `json:"order_bys"` FuzzyQuery bool `json:"fuzzy_query"` EsQuery bool `json:"es_query"` Param *basemodel.ParamBase `json:"param"` }
func (*QueryParam) String ¶
func (param *QueryParam) String() string
func (*QueryParam) ToString ¶
func (param *QueryParam) ToString() string
Click to show internal directories.
Click to hide internal directories.