Files
.github
.vscode
docker
internal
app
applicant
certificate
deployer
domain
notify
pkg
repository
rest
routes
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
certimate/internal/statistics/service.go
2024-11-22 10:59:57 +08:00

26 lines
482 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 {
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)
}