mirror of
https://github.com/usual2970/certimate.git
synced 2025-09-23 00:06:02 +00:00
Certificate displaying and monitoring
This commit is contained in:
25
internal/statistics/service.go
Normal file
25
internal/statistics/service.go
Normal file
@@ -0,0 +1,25 @@
|
||||
package statistics
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/usual2970/certimate/internal/domain"
|
||||
)
|
||||
|
||||
type StatisticsRepository interface {
|
||||
Get(ctx context.Context) (*domain.Statistics, error)
|
||||
}
|
||||
|
||||
type StatisticsService struct {
|
||||
repo StatisticsRepository
|
||||
}
|
||||
|
||||
func NewStatisticsService(repo StatisticsRepository) *StatisticsService {
|
||||
return &StatisticsService{
|
||||
repo: repo,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *StatisticsService) Get(ctx context.Context) (*domain.Statistics, error) {
|
||||
return s.repo.Get(ctx)
|
||||
}
|
Reference in New Issue
Block a user