binder.go 458 B

12345678910111213141516171819202122
  1. package binding
  2. import (
  3. "git.sxidc.com/go-framework/baize/framework/core/api"
  4. "git.sxidc.com/go-framework/baize/framework/core/infrastructure"
  5. )
  6. type Binder struct {
  7. router api.Router
  8. i *infrastructure.Infrastructure
  9. }
  10. func NewBinder(router api.Router, i *infrastructure.Infrastructure) *Binder {
  11. return &Binder{
  12. router: router,
  13. i: i,
  14. }
  15. }
  16. func (binder *Binder) GetInfrastructure() infrastructure.Infrastructure {
  17. return *binder.i
  18. }