binder.go 496 B

123456789101112131415161718192021222324
  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. // NewBinder 构造Binder
  11. // 参数:
  12. // - router: 使用的路由
  13. // - i: 使用的基础设施
  14. // 返回值:
  15. // - 构造的binder
  16. func NewBinder(router api.Router, i *infrastructure.Infrastructure) *Binder {
  17. return &Binder{
  18. router: router,
  19. i: i,
  20. }
  21. }