dao.go 553 B

1234567891011121314151617181920212223242526272829303132333435
  1. package account
  2. import (
  3. "context"
  4. "go-common/app/service/live/xuser/conf"
  5. account "go-common/app/service/main/account/rpc/client"
  6. )
  7. // Dao dao
  8. type Dao struct {
  9. c *conf.Config
  10. accountRPC *account.Service3
  11. }
  12. // New init mysql db
  13. func New(c *conf.Config) (dao *Dao) {
  14. dao = &Dao{
  15. c: c,
  16. accountRPC: account.New3(nil),
  17. }
  18. return
  19. }
  20. // Close close the resource.
  21. func (d *Dao) Close() {
  22. }
  23. // Ping dao ping
  24. func (d *Dao) Ping(c context.Context) error {
  25. // TODO: if you need use mc,redis, please add
  26. // check
  27. return nil
  28. }