github.com/jxgolibs/go-oauth2-server@v1.0.1/health/service.go (about)

     1  package health
     2  
     3  import (
     4  	"github.com/jinzhu/gorm"
     5  )
     6  
     7  // Service struct keeps db object to avoid passing it around
     8  type Service struct {
     9  	db *gorm.DB
    10  }
    11  
    12  // NewService returns a new Service instance
    13  func NewService(db *gorm.DB) *Service {
    14  	return &Service{db: db}
    15  }
    16  
    17  // Close stops any running services
    18  func (s *Service) Close() {}