mirror of
https://github.com/usual2970/certimate.git
synced 2025-08-20 00:01:45 +00:00
.github
.vscode
docker
internal
app
applicant
certificate
deployer
domain
notify
pkg
repository
rest
scheduler
statistics
service.go
workflow
migrations
ui
.dockerignore
.editorconfig
.gitignore
.goreleaser.yml
CHANGELOG.md
CONTRIBUTING.md
CONTRIBUTING_EN.md
Dockerfile
LICENSE.md
Makefile
README.md
README_EN.md
go.mod
go.sum
main.go
nixpacks.toml
usage.gif
26 lines
502 B
Go
26 lines
502 B
Go
package statistics
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/usual2970/certimate/internal/domain"
|
|
)
|
|
|
|
type statisticsRepository interface {
|
|
Get(ctx context.Context) (*domain.Statistics, error)
|
|
}
|
|
|
|
type StatisticsService struct {
|
|
statRepo statisticsRepository
|
|
}
|
|
|
|
func NewStatisticsService(statRepo statisticsRepository) *StatisticsService {
|
|
return &StatisticsService{
|
|
statRepo: statRepo,
|
|
}
|
|
}
|
|
|
|
func (s *StatisticsService) Get(ctx context.Context) (*domain.Statistics, error) {
|
|
return s.statRepo.Get(ctx)
|
|
}
|