You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
767 B

3 years ago
  1. package request
  2. // Casbin info structure
  3. type CasbinInfo struct {
  4. Path string `json:"path"` // 路径
  5. Method string `json:"method"` // 方法
  6. }
  7. // Casbin structure for input parameters
  8. type CasbinInReceive struct {
  9. AuthorityId string `json:"authorityId"` // 权限id
  10. CasbinInfos []CasbinInfo `json:"casbinInfos"`
  11. }
  12. func DefaultCasbin() []CasbinInfo {
  13. return []CasbinInfo{
  14. {Path: "/menu/getMenu", Method: "POST"},
  15. {Path: "/jwt/jsonInBlacklist", Method: "POST"},
  16. {Path: "/base/login", Method: "POST"},
  17. {Path: "/user/register", Method: "POST"},
  18. {Path: "/user/changePassword", Method: "POST"},
  19. {Path: "/user/setUserAuthority", Method: "POST"},
  20. {Path: "/user/setUserInfo", Method: "PUT"},
  21. {Path: "/user/getUserInfo", Method: "GET"},
  22. }
  23. }