Documentation ¶
Index ¶
- func FetchBizIDFromInstance(objID string, instanceData mapstr.MapStr) (int64, error)
- func FillLostedFieldValue(valData mapstr.MapStr, propertys []metadata.Attribute, ignorefields []string)
- func New(dbProxy dal.RDB, dependent OperationDependences, cache *redis.Client) core.InstanceOperation
- func NewValidator(ctx core.ContextParams, dependent OperationDependences, objID string, ...) (*validator, error)
- type EnumOption
- type EnumVal
- type EventHandle
- func (eh *EventHandle) Push(ctx core.ContextParams, objType, eventAction string) error
- func (eh *EventHandle) SetCurData(id int64, data interface{})
- func (eh *EventHandle) SetCurDataAndPush(ctx core.ContextParams, objID, eventAction string, cond mapstr.MapStr) error
- func (eh *EventHandle) SetPreData(id int64, data interface{})
- type FloatOption
- type IntOption
- type OperationDependences
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchBizIDFromInstance ¶
func FillLostedFieldValue ¶
func FillLostedFieldValue(valData mapstr.MapStr, propertys []metadata.Attribute, ignorefields []string)
FillLostedFieldValue fill the value in inst map data
func New ¶
func New(dbProxy dal.RDB, dependent OperationDependences, cache *redis.Client) core.InstanceOperation
New create a new instance manager instance
func NewValidator ¶
func NewValidator(ctx core.ContextParams, dependent OperationDependences, objID string, bizID int64) (*validator, error)
Init init
Types ¶
type EnumOption ¶
type EnumOption []EnumVal
EnumOption enum option
func ParseEnumOption ¶
func ParseEnumOption(val interface{}) (EnumOption, error)
ParseEnumOption convert val to []EnumVal
func (EnumOption) GetDefault ¶
func (opt EnumOption) GetDefault() *EnumVal
GetDefault returns EnumOption's default value
type EnumVal ¶
type EnumVal struct { ID string `bson:"id" json:"id"` Name string `bson:"name" json:"name"` Type string `bson:"type" json:"type"` IsDefault bool `bson:"is_default" json:"is_default"` }
EnumVal enum option val
type EventHandle ¶
type EventHandle struct {
// contains filtered or unexported fields
}
EventHandle event data tmp handle
func (*EventHandle) Push ¶
func (eh *EventHandle) Push(ctx core.ContextParams, objType, eventAction string) error
Push push event to event server
func (*EventHandle) SetCurData ¶
func (eh *EventHandle) SetCurData(id int64, data interface{})
SetCurData set inst current data
func (*EventHandle) SetCurDataAndPush ¶
func (eh *EventHandle) SetCurDataAndPush(ctx core.ContextParams, objID, eventAction string, cond mapstr.MapStr) error
SetCurDataAndPush get current instance info and push data
func (*EventHandle) SetPreData ¶
func (eh *EventHandle) SetPreData(id int64, data interface{})
SetPreData set inst befor data
type FloatOption ¶
FloatOption float option
type OperationDependences ¶
type OperationDependences interface { // IsInstanceExist used to check if the instances asst exist IsInstAsstExist(ctx core.ContextParams, objID string, instID uint64) (exists bool, err error) // DeleteInstAsst used to delete inst asst DeleteInstAsst(ctx core.ContextParams, objID string, instID uint64) error // SelectObjectAttWithParams select object att with params SelectObjectAttWithParams(ctx core.ContextParams, objID string, bizID int64) (attribute []metadata.Attribute, err error) // SearchUnique search unique attribute SearchUnique(ctx core.ContextParams, objID string) (uniqueAttr []metadata.ObjectUnique, err error) }
OperationDependences methods definition
Click to show internal directories.
Click to hide internal directories.