Documentation ¶
Index ¶
- type Mgr
- func (mgr *Mgr) AddDepends(db *gorm.DB, res []rel.Res, relTyp rel.Type, idB string, typB rel.ResType) error
- func (mgr *Mgr) AddRelation(db *gorm.DB, idA string, typA rel.ResType, relTyp rel.Type, idB string, ...) error
- func (mgr *Mgr) AddRelations(db *gorm.DB, idA string, typA rel.ResType, relTyp rel.Type, res []rel.Res) error
- func (mgr *Mgr) CheckOp(db *gorm.DB, id string, typ rel.ResType, op rel.ResOp) error
- func (mgr *Mgr) CheckRelation(db *gorm.DB, idA string, typA rel.ResType, relTyp rel.Type, idB string, ...) error
- func (mgr *Mgr) DelRelation(db *gorm.DB, idA string, typA rel.ResType, relTyp rel.Type, idB string, ...) error
- func (mgr *Mgr) DelRes(db *gorm.DB, id string, typ rel.ResType) error
- func (mgr *Mgr) GetDependents(db *gorm.DB, id string, typ rel.ResType, relTypes []rel.Type) ([]*rel.Relation, error)
- func (mgr *Mgr) GetRelations(db *gorm.DB, id string, typ rel.ResType, relTypes []rel.Type) ([]*rel.Relation, error)
- func (mgr *Mgr) Register(typ rel.ResType, op rel.ResOp, ignores []rel.ResType) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Mgr ¶
type Mgr struct {
// contains filtered or unexported fields
}
func (*Mgr) AddDepends ¶
func (*Mgr) AddRelation ¶
func (*Mgr) AddRelations ¶
func (*Mgr) CheckRelation ¶
func (*Mgr) DelRelation ¶
func (*Mgr) GetDependents ¶
func (mgr *Mgr) GetDependents(db *gorm.DB, id string, typ rel.ResType, relTypes []rel.Type) ([]*rel.Relation, error)
GetDependents 查询某个资源【所依赖】的关系:relTypes为空,会检查该资源的所有所依赖关系
Click to show internal directories.
Click to hide internal directories.