dao.go 560 B

123456789101112131415161718192021222324252627282930313233
  1. package rankdb
  2. import (
  3. "context"
  4. "go-common/app/interface/live/app-interface/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. }