auth.go 912 B

12345678910111213141516171819202122232425262728
  1. package auth
  2. import (
  3. "git.sxidc.com/go-framework/baize/convenient/domain/auth/permission"
  4. "git.sxidc.com/go-framework/baize/convenient/domain/auth/permission_group"
  5. "git.sxidc.com/go-framework/baize/convenient/domain/auth/relations"
  6. "git.sxidc.com/go-framework/baize/convenient/domain/auth/role"
  7. "git.sxidc.com/go-framework/baize/convenient/domain/auth/user"
  8. "git.sxidc.com/go-framework/baize/framework/binding"
  9. )
  10. // Simple Bind参数
  11. type Simple struct {
  12. // schema
  13. Schema string
  14. }
  15. func (simple *Simple) bind(binder *binding.Binder) {
  16. (&permission.Simple{Schema: simple.Schema}).Bind(binder)
  17. (&permission_group.Simple{Schema: simple.Schema}).Bind(binder)
  18. (&role.Simple{Schema: simple.Schema}).Bind(binder)
  19. (&user.Simple{Schema: simple.Schema}).Bind(binder)
  20. (&relations.Simple{Schema: simple.Schema}).Bind(binder)
  21. }
  22. func BindAuth(binder *binding.Binder, simple *Simple) {
  23. simple.bind(binder)
  24. }