sys_auth_rule.go 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // ================================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "context"
  8. "github.com/tiger1103/gfast/v3/api/v1/system"
  9. "github.com/tiger1103/gfast/v3/internal/app/system/model"
  10. "github.com/tiger1103/gfast/v3/internal/app/system/model/entity"
  11. )
  12. type (
  13. ISysAuthRule interface {
  14. GetMenuListSearch(ctx context.Context, req *system.RuleSearchReq) (res []*model.SysAuthRuleInfoRes, err error)
  15. GetIsMenuList(ctx context.Context) ([]*model.SysAuthRuleInfoRes, error)
  16. GetMenuList(ctx context.Context) (list []*model.SysAuthRuleInfoRes, err error)
  17. GetIsButtonList(ctx context.Context) ([]*model.SysAuthRuleInfoRes, error)
  18. Add(ctx context.Context, req *system.RuleAddReq) (err error)
  19. BindRoleRule(ctx context.Context, ruleId interface{}, roleIds []uint) (err error)
  20. Get(ctx context.Context, id uint) (rule *entity.SysAuthRule, err error)
  21. GetMenuRoles(ctx context.Context, id uint) (roleIds []uint, err error)
  22. Update(ctx context.Context, req *system.RuleUpdateReq) (err error)
  23. UpdateRoleRule(ctx context.Context, ruleId uint, roleIds []uint) (err error)
  24. GetMenuListTree(pid uint, list []*model.SysAuthRuleInfoRes) []*model.SysAuthRuleTreeRes
  25. DeleteMenuByIds(ctx context.Context, ids []int) (err error)
  26. FindSonByParentId(list []*model.SysAuthRuleInfoRes, pid uint) []*model.SysAuthRuleInfoRes
  27. }
  28. )
  29. var (
  30. localSysAuthRule ISysAuthRule
  31. )
  32. func SysAuthRule() ISysAuthRule {
  33. if localSysAuthRule == nil {
  34. panic("implement not found for interface ISysAuthRule, forgot register?")
  35. }
  36. return localSysAuthRule
  37. }
  38. func RegisterSysAuthRule(i ISysAuthRule) {
  39. localSysAuthRule = i
  40. }