ping.go 369 B

1234567891011121314151617181920212223
  1. package ping
  2. import (
  3. "context"
  4. "go-common/app/interface/main/app-resource/conf"
  5. pgdao "go-common/app/interface/main/app-resource/dao/plugin"
  6. )
  7. type Service struct {
  8. pgDao *pgdao.Dao
  9. }
  10. func New(c *conf.Config) (s *Service) {
  11. s = &Service{
  12. pgDao: pgdao.New(c),
  13. }
  14. return
  15. }
  16. func (s *Service) Ping(c context.Context) (err error) {
  17. return s.pgDao.PingDB(c)
  18. }