Certificate displaying and monitoring

This commit is contained in:
yoan
2024-11-22 10:59:57 +08:00
parent 09e4b24445
commit 86761bd3a0
19 changed files with 498 additions and 381 deletions

View 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)
}