Documentation ¶
Index ¶
- func FetchBizIDFromInstance(objID string, instanceData mapstr.MapStr) (int64, error)
- func FillLostedFieldValue(ctx context.Context, valData mapstr.MapStr, propertys []metadata.Attribute)
- func New(dependent OperationDependences, language language.CCLanguageIf) core.InstanceOperation
- func NewValidator(kit *rest.Kit, dependent OperationDependences, objID string, bizID int64, ...) (*validator, error)
- type EnumOption
- type EnumVal
- type FloatOption
- type IntOption
- type OperationDependences
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchBizIDFromInstance ¶
func FillLostedFieldValue ¶
func FillLostedFieldValue(ctx context.Context, valData mapstr.MapStr, propertys []metadata.Attribute)
FillLostedFieldValue fill the value in inst map data
func New ¶
func New(dependent OperationDependences, language language.CCLanguageIf) core.InstanceOperation
New create a new instance manager instance
func NewValidator ¶
func NewValidator(kit *rest.Kit, dependent OperationDependences, objID string, bizID int64, language language.CCLanguageIf) (*validator, error)
Init init
Types ¶
type EnumOption ¶
type EnumOption []EnumVal
EnumOption enum option
func ParseEnumOption ¶
func ParseEnumOption(ctx context.Context, 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 FloatOption ¶
FloatOption float option
type OperationDependences ¶
type OperationDependences interface { // IsInstanceExist used to check if the instances asst exist IsInstAsstExist(kit *rest.Kit, objID string, instID uint64) (exists bool, err error) // DeleteInstAsst used to delete inst asst DeleteInstAsst(kit *rest.Kit, objID string, instID uint64) error // SelectObjectAttWithParams select object att with params SelectObjectAttWithParams(kit *rest.Kit, objID string, bizID int64) (attribute []metadata.Attribute, err error) // SearchUnique search unique attribute SearchUnique(kit *rest.Kit, objID string) (uniqueAttr []metadata.ObjectUnique, err error) }
OperationDependences methods definition
Click to show internal directories.
Click to hide internal directories.