dao.go 378 B

12345678910111213141516171819202122
  1. package account
  2. import (
  3. "go-common/app/interface/main/tv/conf"
  4. accwar "go-common/app/service/main/account/api"
  5. )
  6. // Dao is account dao.
  7. type Dao struct {
  8. // rpc
  9. accClient accwar.AccountClient
  10. }
  11. // New account dao.
  12. func New(c *conf.Config) (d *Dao) {
  13. d = &Dao{}
  14. var err error
  15. if d.accClient, err = accwar.NewClient(c.AccClient); err != nil {
  16. panic(err)
  17. }
  18. return
  19. }