dao.go 434 B

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