dao.go 351 B

123456789101112131415161718192021222324252627282930
  1. package dao
  2. import (
  3. "context"
  4. "go-common/app/job/main/upload/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. }
  20. // Ping dao ping
  21. func (d *Dao) Ping(c context.Context) error {
  22. return nil
  23. }